|  | 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>

- List of all members, including inherited members
- Qt 3 support members

### Static Public Members

- QPalette palette ()
- void showText ( const QPoint & pos, const QString & text, QWidget * w = 0 )

## 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.

Rich text formatted tips implictely do word breaking, unless specified differently with `<p style='white-space:pre'>`.

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. If text is empty the tool tip is hidden.