itom  4.1.0
ToolTip Class Reference

Static Public Member Functions

static void showText (const QPoint &pos, const QString &text, QWidget *w=nullptr, const QPoint &alternativeTopRightPos=QPoint())
 
static void showText (const QPoint &pos, const QString &text, QWidget *w, const QRect &rect)
 
static void showText (const QPoint &pos, const QString &text, QWidget *w, const QRect &rect, int msecShowTime, const QPoint &alternativeTopRightPos=QPoint())
 
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 &)
 

Member Function Documentation

QFont ToolTip::font ( )
static
Since
4.2 Returns the font used to render tooltips.
bool ToolTip::isVisible ( )
static
Since
4.4 Returns true if this tooltip is currently shown.
See also
showText()
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.
void ToolTip::setFont ( const QFont &  font)
static
Since
4.2 Sets the font used to render tooltips.
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.
void ToolTip::showText ( const QPoint &  pos,
const QString &  text,
QWidget *  w = nullptr,
const QPoint &  alternativeTopRightPos = QPoint() 
)
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())

void ToolTip::showText ( const QPoint &  pos,
const QString &  text,
QWidget *  w,
const QRect &  rect 
)
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 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.

void ToolTip::showText ( const QPoint &  pos,
const QString &  text,
QWidget *  w,
const QRect &  rect,
int  msecDisplayTime,
const QPoint &  alternativeTopRightPos = QPoint() 
)
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.
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: