<class name="QToolTip" doc="/** <p>The <a href="QToolTip.html"><tt>QToolTip</tt></a> class provides tool tips (balloon help) for any widget.</p> <p>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 <a href="QTextEdit.html">rich text</tt></a> formatted string.</p> <p>Rich text displayed in a tool tip is implicitly word-wrapped unless specified differently with <tt>&lt;p style='white-space:pre'&gt;</tt>.</p> <p>The simplest and most common way to set a widget's tool tip is by calling its QWidget::setToolTip() function.</p> <p>It is also possible to show different tool tips for different regions of a widget, by using a <a href="QHelpEvent.html"><tt>QHelpEvent</tt></a> of type QEvent::ToolTip. Intercept the help event in your widget's event() function and call QToolTip::showText() with the text you want to display. The Tooltips</tt> example illustrates this technique.</p> <p>Note that, if you want to show tooltips in an item view, the model/view architecture provides functionality to set an item's tool tip; e.g&#x2e;, the QTableWidgetItem::setToolTip() function. However, if you want to provide custom tool tips in an item view, you must intercept the help event in the QAbstractItemView::viewportEvent() function and handle it yourself.</p> <p>The default tool tip color and font can be customized with <a href="QToolTip.html#setPalette(com.trolltech.qt.gui.QPalette)"><tt>setPalette</tt></a> and <a href="QToolTip.html#setFont(com.trolltech.qt.gui.QFont)"><tt>setFont</tt></a>.</p> @see <tt>QWidget::toolTip</tt> @see <tt>QAction::toolTip</tt> @see Tool Tips Example</tt> */"> <method name="public native static com.trolltech.qt.gui.QFont font()" doc="/** <p>Returns the font used to render tooltips.</p> @see <a href="QToolTip.html#setFont(com.trolltech.qt.gui.QFont)"><tt>setFont</tt></a> */"/> <method name="public native static void hideText()" doc="/** <p>Hides the tool tip. This is the same as calling <a href="QToolTip.html#showText(com.trolltech.qt.core.QPoint, java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>showText</tt></a> with an empty string.</p> @see <a href="QToolTip.html#showText(com.trolltech.qt.core.QPoint, java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>showText</tt></a> */"/> <method name="public native static com.trolltech.qt.gui.QPalette palette()" doc="/** <p>Returns the palette used to render tooltips.</p> @see <a href="QToolTip.html#setPalette(com.trolltech.qt.gui.QPalette)"><tt>setPalette</tt></a> */"/> <method name="public static void setFont(com.trolltech.qt.gui.QFont arg__1)" doc="/** <p>Sets the <tt>arg__1</tt> used to render tooltips.</p> @see <a href="QToolTip.html#font()"><tt>font</tt></a> */"/> <method name="public static void setPalette(com.trolltech.qt.gui.QPalette arg__1)" doc="/** <p>Sets the <tt>arg__1</tt> used to render tooltips.</p> @see <a href="QToolTip.html#palette()"><tt>palette</tt></a> */"/> <method name="public static void showText(com.trolltech.qt.core.QPoint pos, java.lang.String text, com.trolltech.qt.gui.QWidget w, com.trolltech.qt.core.QRect rect)" doc="/** <p>Shows <tt>text</tt> as a tool tip, with the global position <tt>pos</tt> as the point of interest. The tool tip will be shown with a platform specific offset from this point of interest.</p> <p>If you specify a non-empty rect the tip will be hidden as soon as you move your cursor out of this area.</p> <p>The <tt>rect</tt> is in the coordinates of the widget you specify with <tt>w</tt>. If the <tt>rect</tt> is not empty you must specify a widget. Otherwise this argument can be 0 but it is used to determine the appropriate screen on multi-head systems.</p> <p>If <tt>text</tt> is empty the tool tip is hidden. If the text is the same as the currently shown tooltip, the tip will <i>not</i> move. You can force moving by first hiding the tip with an empty text, and then showing the new tip at the new position.</p> */"/> <method name="public static void showText(com.trolltech.qt.core.QPoint pos, java.lang.String text, com.trolltech.qt.gui.QWidget w)" doc="/** <p>This is analogous to calling QToolTip::showText(<tt>pos</tt>, <tt>text</tt>, <tt>w</tt>, QRect())</p> */"/> <method name="public static void showText(com.trolltech.qt.core.QPoint pos, java.lang.String text)" doc="/** <p>Equivalent to <a href="QToolTip.html#showText(com.trolltech.qt.core.QPoint, java.lang.String, com.trolltech.qt.gui.QWidget)"><tt>showText</tt></a>(<tt>pos</tt>, <tt>text</tt>, 0). */"/> </class>