1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/kernel/qtooltip.cpp -->
7
<title>Qt 4.0: QToolTip Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QToolTip Class Reference</h1>
21
<p>The QToolTip class provides tool tips (balloon help) for any widget. <a href="#details">More...</a></p>
22
<pre>#include <QToolTip></pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
24
<li><a href="qtooltip-members.html">List of all members, including inherited members</a></li>
25
<li><a href="qtooltip-qt3.html">Qt 3 support members</a></li>
27
<a name="static-public-members"></a>
28
<h3>Static Public Members</h3>
30
<li><div class="fn"/>QPalette <b><a href="qtooltip.html#palette">palette</a></b> ()</li>
31
<li><div class="fn"/>void <b><a href="qtooltip.html#showText">showText</a></b> ( const QPoint & <i>pos</i>, const QString & <i>text</i>, QWidget * <i>w</i> = 0 )</li>
33
<a name="details"></a>
35
<h2>Detailed Description</h2>
36
<p>The QToolTip class provides tool tips (balloon help) for any widget.</p>
37
<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</a> formatted string.</p>
38
<p>The simplest and most common way to set a widget's tooltip is by calling its <a href="qwidget.html#toolTip-prop">QWidget::setToolTip</a>() function.</p>
39
<p>It is also possible to show different tool tips for different regions of a widget, by using a <a href="qhelpevent.html">QHelpEvent</a> of type <a href="qevent.html#Type-enum">QEvent::ToolTip</a>. Intercept the help event in your widget's <a href="qwidget.html#event">QWidget::event</a>() function and call <a href="qtooltip.html#showText">QToolTip::showText</a>() with the text you want to display.</p>
41
<h2>Member Function Documentation</h2>
42
<h3 class="fn"><a name="palette"></a><a href="qpalette.html">QPalette</a> QToolTip::palette () <tt> [static]</tt></h3>
43
<p>Returns the palette used to render tooltips.</p>
44
<h3 class="fn"><a name="showText"></a>void QToolTip::showText ( const <a href="qpoint.html">QPoint</a> & <i>pos</i>, const <a href="qstring.html">QString</a> & <i>text</i>, <a href="qwidget.html">QWidget</a> * <i>w</i> = 0 ) <tt> [static]</tt></h3>
45
<p>Shows <i>text</i> as a tool tip, at global position <i>pos</i>. The optional widget argument, <i>w</i>, is used to determine the appropriate screen on multi-head systems.</p>
46
<p /><address><hr /><div align="center">
47
<table width="100%" cellspacing="0" border="0"><tr class="address">
48
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
49
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
50
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
51
</tr></table></div></address></body>