|
static void | showText (const QPoint &pos, const QString &text, QWidget *w=nullptr, const QPoint &alternativeTopRightPos=QPoint(), bool doNotForceYToBeWithinScreen=false) |
|
static void | showText (const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, bool doNotForceYToBeWithinScreen=false) |
|
static void | showText (const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecShowTime, const QPoint &alternativeTopRightPos=QPoint(), bool doNotForceYToBeWithinScreen=false) |
|
static void | hideText () |
|
static bool | isVisible () |
|
static QString | text () |
|
static QPalette | palette () |
|
static void | setPalette (const QPalette &) |
|
static QFont | font () |
|
static void | setFont (const QFont &) |
|
◆ font()
- Since
- 4.2 Returns the font used to render tooltips.
◆ isVisible()
bool ToolTip::isVisible |
( |
| ) |
|
|
static |
- Since
- 4.4 Returns
true
if this tooltip is currently shown.
- See also
- showText()
◆ palette()
QPalette ToolTip::palette |
( |
| ) |
|
|
static |
Returns the palette used to render tooltips.
- Note
- Tool tips use the inactive color group of QPalette, because tool tips are not active windows.
◆ setFont()
void ToolTip::setFont |
( |
const QFont & | font | ) |
|
|
static |
- Since
- 4.2 Sets the font used to render tooltips.
◆ setPalette()
void ToolTip::setPalette |
( |
const QPalette & | palette | ) |
|
|
static |
- Since
- 4.2 Sets the palette used to render tooltips.
- Note
- Tool tips use the inactive color group of QPalette, because tool tips are not active windows.
◆ showText() [1/3]
void ToolTip::showText |
( |
const QPoint & | pos, |
|
|
const QString & | text, |
|
|
QWidget * | w, |
|
|
const QRect & | rect, |
|
|
bool | doNotForceYToBeWithinScreen = false ) |
|
static |
Shows text as a tool tip, with the global position pos as the point of interest. The tool tip will be shown with a platform specific offset from this point of interest. If you specify a non-empty rect the tip will be hidden as soon as you move your cursor out of this area. The rect is in the coordinates of the widget you specify with w. If the rect is not empty you must specify a widget. Otherwise this argument can be \nullptr but it is used to determine the appropriate screen on multi-head systems. If text is empty the tool tip is hidden. If the text is the same as the currently shown tooltip, the tip will not move. You can force moving by first hiding the tip with an empty text, and then showing the new tip at the new position.
- Parameters
-
doNotForceYToBeWithinScreen | usually the tooltip is either below or above the desired position. However, if the tooltip is to big in height, it will be vertically moved to not exceed the screen limits. For code completions, this might lead to the situation, that the tooltip overlaps the current cursor position. If this is not desired, set this value to true. |
◆ showText() [2/3]
void ToolTip::showText |
( |
const QPoint & | pos, |
|
|
const QString & | text, |
|
|
QWidget * | w, |
|
|
const QRect & | rect, |
|
|
int | msecDisplayTime, |
|
|
const QPoint & | alternativeTopRightPos = QPoint(), |
|
|
bool | doNotForceYToBeWithinScreen = false ) |
|
static |
- Since
- 5.2 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is similar to ItomToolTip::showText(pos, text, w, rect) but with an extra parameter msecDisplayTime that specifies how long the tool tip will be displayed, in milliseconds.
- Parameters
-
doNotForceYToBeWithinScreen | usually the tooltip is either below or above the desired position. However, if the tooltip is to big in height, it will be vertically moved to not exceed the screen limits. For code completions, this might lead to the situation, that the tooltip overlaps the current cursor position. If this is not desired, set this value to true. |
◆ showText() [3/3]
void ToolTip::showText |
( |
const QPoint & | pos, |
|
|
const QString & | text, |
|
|
QWidget * | w = nullptr, |
|
|
const QPoint & | alternativeTopRightPos = QPoint(), |
|
|
bool | doNotForceYToBeWithinScreen = false ) |
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is analogous to calling ItomToolTip::showText(pos, text, w, QRect())
◆ text()
QString ToolTip::text |
( |
| ) |
|
|
static |
- Since
- 4.4 Returns the tooltip text, if a tooltip is visible, or an empty string if a tooltip is not visible.
The documentation for this class was generated from the following files:
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/codeEditor/toolTip.h
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/Qitom/codeEditor/toolTip.cpp