Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QToolTip Class Reference
[QtGui module]

The QToolTip class provides tool tips (balloon help) for any widget. More...

#include <QToolTip>

Static Public Members


Detailed Description

The QToolTip class provides tool tips (balloon help) for any widget.

The tip is a short piece of text reminding the user of the widget's function. It is drawn immediately below the given position in a distinctive black-on-yellow color combination. The tip can be any rich text formatted string.

The simplest and most common way to set a widget's tooltip is by calling its QWidget::setToolTip() function.

It is also possible to show different tool tips for different regions of a widget, by using a QHelpEvent of type QEvent::ToolTip. Intercept the help event in your widget's QWidget::event() function and call QToolTip::showText() with the text you want to display. The Tooltips example illustrates this technique.

See also QWidget::toolTip and QAction::toolTip.


Member Function Documentation

QPalette QToolTip::palette ()   [static]

Returns the palette used to render tooltips.

void QToolTip::showText ( const QPoint & pos, const QString & text, QWidget * w = 0 )   [static]

Shows text as a tool tip, at global position pos. The optional widget argument, w, is used to determine the appropriate screen on multi-head systems.


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0
Hosted by uCoz