source: trunk/doc/html/qtooltip.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 22.6 KB
RevLine 
[190]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/widgets/qtooltip.cpp:643 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QToolTip Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QToolTip Class Reference</h1>
33
34<p>The QToolTip class provides tool tips (balloon help) for
35any widget or rectangular part of a widget.
36<a href="#details">More...</a>
37<p><tt>#include &lt;<a href="qtooltip-h.html">qtooltip.h</a>&gt;</tt>
38<p>Inherits <a href="qt.html">Qt</a>.
39<p><a href="qtooltip-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn><a href="#QToolTip"><b>QToolTip</b></a> ( QWidget&nbsp;*&nbsp;widget, QToolTipGroup&nbsp;*&nbsp;group = 0 )</li>
43<li class=fn>QWidget * <a href="#parentWidget"><b>parentWidget</b></a> () const</li>
44<li class=fn>QToolTipGroup * <a href="#group"><b>group</b></a> () const</li>
45</ul>
46<h2>Static Public Members</h2>
47<ul>
48<li class=fn>void <a href="#add"><b>add</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
49<li class=fn>void <a href="#add-2"><b>add</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QString&nbsp;&amp;&nbsp;text, QToolTipGroup&nbsp;*&nbsp;group, const&nbsp;QString&nbsp;&amp;&nbsp;longText )</li>
50<li class=fn>void <a href="#remove"><b>remove</b></a> ( QWidget&nbsp;*&nbsp;widget )</li>
51<li class=fn>void <a href="#add-3"><b>add</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
52<li class=fn>void <a href="#add-4"><b>add</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text, QToolTipGroup&nbsp;*&nbsp;group, const&nbsp;QString&nbsp;&amp;&nbsp;groupText )</li>
53<li class=fn>void <a href="#remove-2"><b>remove</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QRect&nbsp;&amp;&nbsp;rect )</li>
54<li class=fn>QString <a href="#textFor"><b>textFor</b></a> ( QWidget&nbsp;*&nbsp;widget, const&nbsp;QPoint&nbsp;&amp;&nbsp;pos = QPoint ( ) )</li>
55<li class=fn>void <a href="#hide"><b>hide</b></a> ()</li>
56<li class=fn>QFont <a href="#font"><b>font</b></a> ()</li>
57<li class=fn>void <a href="#setFont"><b>setFont</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;font )</li>
58<li class=fn>QPalette <a href="#palette"><b>palette</b></a> ()</li>
59<li class=fn>void <a href="#setPalette"><b>setPalette</b></a> ( const&nbsp;QPalette&nbsp;&amp;&nbsp;palette )</li>
60<li class=fn>void setEnabled ( bool&nbsp;enable ) &nbsp;<em>(obsolete)</em></li>
61<li class=fn>bool enabled () &nbsp;<em>(obsolete)</em></li>
62<li class=fn>void <a href="#setGloballyEnabled"><b>setGloballyEnabled</b></a> ( bool&nbsp;enable )</li>
63<li class=fn>bool <a href="#isGloballyEnabled"><b>isGloballyEnabled</b></a> ()</li>
64<li class=fn>void <a href="#setWakeUpDelay"><b>setWakeUpDelay</b></a> ( int&nbsp;i )</li>
65</ul>
66<h2>Protected Members</h2>
67<ul>
68<li class=fn>virtual void <a href="#maybeTip"><b>maybeTip</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;p ) = 0</li>
69<li class=fn>void <a href="#tip"><b>tip</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text )</li>
70<li class=fn>void <a href="#tip-2"><b>tip</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text, const&nbsp;QString&nbsp;&amp;&nbsp;groupText )</li>
71<li class=fn>void <a href="#tip-3"><b>tip</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text, const&nbsp;QRect&nbsp;&amp;&nbsp;geometry )</li>
72<li class=fn>void <a href="#tip-4"><b>tip</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;rect, const&nbsp;QString&nbsp;&amp;&nbsp;text, const&nbsp;QString&nbsp;&amp;&nbsp;groupText, const&nbsp;QRect&nbsp;&amp;&nbsp;geometry )</li>
73<li class=fn>void <a href="#clear"><b>clear</b></a> ()</li>
74</ul>
75<hr><a name="details"></a><h2>Detailed Description</h2>
76
77
78The QToolTip class provides tool tips (balloon help) for
79any widget or rectangular part of a widget.
80<p>
81
82<p> The tip is a short, single line of text reminding the user of the
83widget's or rectangle's function. It is drawn immediately below
84the region in a distinctive black-on-yellow combination.
85<p> The tip can be any Rich-Text formatted string.
86<p> <a href="qtooltipgroup.html">QToolTipGroup</a> provides a way for tool tips to display another text
87elsewhere (most often in a <a href="qstatusbar.html">status bar</a>).
88<p> At any point in time, QToolTip is either dormant or active. In
89dormant mode the tips are not shown and in active mode they are.
90The mode is global, not particular to any one widget.
91<p> QToolTip switches from dormant to active mode when the user hovers
92the mouse on a tip-equipped region for a second or so and remains
93active until the user either clicks a mouse button, presses a key,
94lets the mouse hover for five seconds or moves the mouse outside
95<em>all</em> tip-equipped regions for at least a second.
96<p> The QToolTip class can be used in three different ways:
97<ol type=1>
98<li> Adding a tip to an entire widget.
99<li> Adding a tip to a fixed rectangle within a widget.
100<li> Adding a tip to a dynamic rectangle within a widget.
101</ol>
102<p> To add a tip to a widget, call the <em>static</em> function
103<a href="#add">QToolTip::add</a>() with the widget and tip as arguments:
104<p> <pre>
105 QToolTip::<a href="#add">add</a>( quitButton, "Leave the application" );
106 </pre>
107
108<p> This is the simplest and most common use of QToolTip. The tip
109will be deleted automatically when <em>quitButton</em> is deleted, but
110you can remove it yourself, too:
111<p> <pre>
112 QToolTip::<a href="#remove">remove</a>( quitButton );
113 </pre>
114
115<p> You can also display another text (typically in a <a href="qstatusbar.html">status bar),</a> courtesy of <a href="qtooltipgroup.html">QToolTipGroup</a>. This example
116assumes that <em>grp</em> is a <tt>QToolTipGroup *</tt> and is already
117connected to the appropriate status bar:
118<p> <pre>
119 QToolTip::<a href="#add">add</a>( quitButton, "Leave the application", grp,
120 "Leave the application, prompting to save if necessary" );
121 QToolTip::<a href="#add">add</a>( closeButton, "Close this window", grp,
122 "Close this window, prompting to save if necessary" );
123 </pre>
124
125<p> To add a tip to a fixed rectangle within a widget, call the static
126function <a href="#add">QToolTip::add</a>() with the widget, rectangle and tip as
127arguments. (See the <a href="tooltip-example.html">tooltip/tooltip.cpp</a> example.) Again, you
128can supply a <tt>QToolTipGroup *</tt> and another text if you want.
129<p> Both of these are one-liners and cover the majority of cases. The
130third and most general way to use QToolTip requires you to
131reimplement a pure virtual function to decide whether to pop up a
132tool tip. The <a href="tooltip-example.html">tooltip/tooltip.cpp</a> example demonstrates this
133too. This mode can be used to implement tips for text that can
134move as the user scrolls, for example.
135<p> To use QToolTip like this, you must subclass QToolTip and
136reimplement <a href="#maybeTip">maybeTip</a>(). QToolTip calls maybeTip() when a tip
137should pop up, and maybeTip() decides whether to show a tip.
138<p> Tool tips can be globally disabled using
139<a href="#setGloballyEnabled">QToolTip::setGloballyEnabled</a>() or disabled in groups with
140<a href="qtooltipgroup.html#setEnabled">QToolTipGroup::setEnabled</a>().
141<p> You can retrieve the text of a tooltip for a given position within
142a widget using <a href="#textFor">textFor</a>().
143<p> The global tooltip font and palette can be set with the static
144<a href="#setFont">setFont</a>() and <a href="#setPalette">setPalette</a>() functions respectively.
145<p> <p>See also <a href="qstatusbar.html">QStatusBar</a>, <a href="qwhatsthis.html">QWhatsThis</a>, <a href="qtooltipgroup.html">QToolTipGroup</a>, <a href="guibooks.html#fowler">GUI Design Handbook: Tool Tip</a>, and <a href="helpsystem.html">Help System</a>.
146
147<hr><h2>Member Function Documentation</h2>
148<h3 class=fn><a name="QToolTip"></a>QToolTip::QToolTip ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, <a href="qtooltipgroup.html">QToolTipGroup</a>&nbsp;*&nbsp;group = 0 )
149</h3>
150Constructs a tool tip object. This is only necessary if you need
151tool tips on regions that can move within the widget (most often
152because the widget's contents can scroll).
153<p> <em>widget</em> is the widget you want to add dynamic tool tips to and
154<em>group</em> (optional) is the tool tip group they should belong to.
155<p> <b>Warning:</b> QToolTip is not a subclass of <a href="qobject.html">QObject</a>, so the instance of
156QToolTip is not deleted when <em>widget</em> is deleted.
157<p> <b>Warning:</b> If you delete the tool tip before you have deleted
158<em>widget</em> then you need to make sure you call <a href="#remove">remove</a>() yourself from
159<em>widget</em> in your reimplemented QToolTip destructor.
160<p> <pre>
161 MyToolTip::~MyToolTip()
162 {
163 <a href="#remove">remove</a>( widget );
164 }
165 </pre>
166
167<p> <p>See also <a href="#maybeTip">maybeTip</a>().
168
169<h3 class=fn>void <a name="add"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )<tt> [static]</tt>
170</h3>
171Adds a tool tip to <em>widget</em>. <em>text</em> is the text to be shown in
172the tool tip.
173<p> This is the most common entry point to the QToolTip class; it is
174suitable for adding tool tips to buttons, checkboxes, comboboxes
175and so on.
176
177<p>Examples: <a href="helpsystem-example.html#x2695">helpsystem/mainwindow.cpp</a>, <a href="qdir-example.html#x1848">qdir/qdir.cpp</a>, <a href="scribble-example.html#x945">scribble/scribble.cpp</a>, and <a href="tooltip-example.html#x450">tooltip/tooltip.cpp</a>.
178<h3 class=fn>void <a name="add-2"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, <a href="qtooltipgroup.html">QToolTipGroup</a>&nbsp;*&nbsp;group, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;longText )<tt> [static]</tt>
179</h3>
180This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
181<p> Adds a tool tip to <em>widget</em> and to tool tip group <em>group</em>.
182<p> <em>text</em> is the text shown in the tool tip and <em>longText</em> is the
183text emitted from <em>group</em>.
184<p> Normally, <em>longText</em> is shown in a <a href="qstatusbar.html">status
185 bar</a> or similar.
186
187<h3 class=fn>void <a name="add-3"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )<tt> [static]</tt>
188</h3>
189This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
190<p> Adds a tool tip to a fixed rectangle, <em>rect</em>, within <em>widget</em>.
191<em>text</em> is the text shown in the tool tip.
192
193<h3 class=fn>void <a name="add-4"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, <a href="qtooltipgroup.html">QToolTipGroup</a>&nbsp;*&nbsp;group, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;groupText )<tt> [static]</tt>
194</h3>
195This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
196<p> Adds a tool tip to an entire <em>widget</em> and to tool tip group <em>group</em>. The tooltip will disappear when the mouse leaves the <em>rect</em>.
197<p> <em>text</em> is the text shown in the tool tip and <em>groupText</em> is the
198text emitted from <em>group</em>.
199<p> Normally, <em>groupText</em> is shown in a <a href="qstatusbar.html">status
200 bar</a> or similar.
201
202<h3 class=fn>void <a name="clear"></a>QToolTip::clear ()<tt> [protected]</tt>
203</h3>
204Immediately removes all tool tips for this tooltip's parent
205widget.
206
207<h3 class=fn>bool <a name="enabled"></a>QToolTip::enabled ()<tt> [static]</tt>
208</h3>
209
210<p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
211<p>
212<h3 class=fn><a href="qfont.html">QFont</a> <a name="font"></a>QToolTip::font ()<tt> [static]</tt>
213</h3>
214Returns the font common to all tool tips.
215<p> <p>See also <a href="#setFont">setFont</a>().
216
217<h3 class=fn><a href="qtooltipgroup.html">QToolTipGroup</a>&nbsp;* <a name="group"></a>QToolTip::group () const
218</h3>
219
220<p> Returns the tool tip group this QToolTip is a member of or 0 if it
221isn't a member of any group.
222<p> The tool tip group is the object responsible for maintaining
223contact between tool tips and a <a href="qstatusbar.html">status
224 bar</a> or something else which can show the longer help text.
225<p> <p>See also <a href="#parentWidget">parentWidget</a>() and <a href="qtooltipgroup.html">QToolTipGroup</a>.
226
227<h3 class=fn>void <a name="hide"></a>QToolTip::hide ()<tt> [static]</tt>
228</h3>
229Hides any tip that is currently being shown.
230<p> Normally, there is no need to call this function; QToolTip takes
231care of showing and hiding the tips as the user moves the mouse.
232
233<h3 class=fn>bool <a name="isGloballyEnabled"></a>QToolTip::isGloballyEnabled ()<tt> [static]</tt>
234</h3>
235Returns whether tool tips are enabled globally.
236<p> <p>See also <a href="#setGloballyEnabled">setGloballyEnabled</a>().
237
238<h3 class=fn>void <a name="maybeTip"></a>QToolTip::maybeTip ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p )<tt> [pure virtual protected]</tt>
239</h3>
240
241<p> This pure virtual function is half of the most versatile interface
242QToolTip offers.
243<p> It is called when there is a possibility that a tool tip should be
244shown and must decide whether there is a tool tip for the point <em>p</em> in the widget that this QToolTip object relates to. If so,
245<a href="#maybeTip">maybeTip</a>() must call <a href="#tip">tip</a>() with the rectangle the tip applies to,
246the tip's text and optionally the <a href="qtooltipgroup.html">QToolTipGroup</a> details and the
247geometry in screen coordinates.
248<p> <em>p</em> is given in that widget's local coordinates. Most maybeTip()
249implementations will be of the form:
250<p> <pre>
251 if ( &lt;something&gt; ) {
252 <a href="#tip">tip</a>( &lt;something&gt;, &lt;something&gt; );
253 }
254 </pre>
255
256<p> The first argument to tip() (a rectangle) must encompass <em>p</em>,
257i.e. the tip must apply to the current mouse position; otherwise
258QToolTip's operation is undefined.
259<p> Note that the tip will disappear once the mouse moves outside the
260rectangle you give to tip(), and will not reappear if the mouse
261moves back in: maybeTip() is called again instead.
262<p> <p>See also <a href="#tip">tip</a>().
263
264<p>Examples: <a href="helpsystem-example.html#x2684">helpsystem/tooltip.cpp</a> and <a href="tooltip-example.html#x451">tooltip/tooltip.cpp</a>.
265<h3 class=fn><a href="qpalette.html">QPalette</a> <a name="palette"></a>QToolTip::palette ()<tt> [static]</tt>
266</h3>
267Returns the palette common to all tool tips.
268<p> <p>See also <a href="#setPalette">setPalette</a>().
269
270<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="parentWidget"></a>QToolTip::parentWidget () const
271</h3>
272
273<p> Returns the widget this QToolTip applies to.
274<p> The tool tip is destroyed automatically when the parent widget is
275destroyed.
276<p> <p>See also <a href="#group">group</a>().
277
278<h3 class=fn>void <a name="remove"></a>QToolTip::remove ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget )<tt> [static]</tt>
279</h3>
280Removes the tool tip from <em>widget</em>.
281<p> If there is more than one tool tip on <em>widget</em>, only the one
282covering the entire widget is removed.
283
284<h3 class=fn>void <a name="remove-2"></a>QToolTip::remove ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect )<tt> [static]</tt>
285</h3>
286This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
287<p> Removes any tool tip for <em>rect</em> from <em>widget</em>.
288<p> If there is more than one tool tip on <em>widget</em>, only the one
289covering rectangle <em>rect</em> is removed.
290
291<h3 class=fn>void <a name="setEnabled"></a>QToolTip::setEnabled ( bool&nbsp;enable )<tt> [static]</tt>
292</h3>
293
294<p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
295<p>
296<h3 class=fn>void <a name="setFont"></a>QToolTip::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;font )<tt> [static]</tt>
297</h3>
298Sets the font for all tool tips to <em>font</em>.
299<p> <p>See also <a href="#font">font</a>().
300
301<h3 class=fn>void <a name="setGloballyEnabled"></a>QToolTip::setGloballyEnabled ( bool&nbsp;enable )<tt> [static]</tt>
302</h3>
303If <em>enable</em> is TRUE sets all tool tips to be enabled (shown when
304needed); if <em>enable</em> is FALSE sets all tool tips to be disabled
305(never shown).
306<p> By default, tool tips are enabled. Note that this function affects
307all tool tips in the entire application.
308<p> <p>See also <a href="qtooltipgroup.html#enabled-prop">QToolTipGroup::enabled</a>.
309
310<h3 class=fn>void <a name="setPalette"></a>QToolTip::setPalette ( const&nbsp;<a href="qpalette.html">QPalette</a>&nbsp;&amp;&nbsp;palette )<tt> [static]</tt>
311</h3>
312Sets the palette for all tool tips to <em>palette</em>.
313<p> <p>See also <a href="#palette">palette</a>().
314
315<h3 class=fn>void <a name="setWakeUpDelay"></a>QToolTip::setWakeUpDelay ( int&nbsp;i )<tt> [static]</tt>
316</h3>
317Sets the wakeup delay for all tooltips to <em>i</em>
318milliseconds.
319
320<h3 class=fn><a href="qstring.html">QString</a> <a name="textFor"></a>QToolTip::textFor ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;widget, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos = QPoint ( ) )<tt> [static]</tt>
321</h3>
322Returns the tool tip text for <em>widget</em> at position <em>pos</em>, or
323<a href="qstring.html#QString-null">QString::null</a> if there is no tool tip for the given widget and
324position.
325
326<h3 class=fn>void <a name="tip"></a>QToolTip::tip ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text )<tt> [protected]</tt>
327</h3>
328Immediately pops up a tip saying <em>text</em> and removes the tip once
329the cursor moves out of rectangle <em>rect</em> (which is given in the
330coordinate system of the widget this QToolTip relates to).
331<p> The tip will not reappear if the cursor moves back; your
332<a href="#maybeTip">maybeTip</a>() must reinstate it each time.
333
334<h3 class=fn>void <a name="tip-2"></a>QToolTip::tip ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;groupText )<tt> [protected]</tt>
335</h3>
336This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
337<p> Immediately pops up a tip saying <em>text</em> and removes that tip once
338the cursor moves out of rectangle <em>rect</em> (which is given in the
339coordinate system of the widget this QToolTip relates to). <em>groupText</em> is the text emitted from the group.
340<p> The tip will not reappear if the cursor moves back; your
341<a href="#maybeTip">maybeTip</a>() must reinstate it each time.
342
343<h3 class=fn>void <a name="tip-3"></a>QToolTip::tip ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;geometry )<tt> [protected]</tt>
344</h3>
345This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
346<p> Immediately pops up a tip within the rectangle <em>geometry</em>, saying
347<em>text</em> and removes the tip once the cursor moves out of rectangle
348<em>rect</em>. Both rectangles are given in the coordinate system of the
349widget this QToolTip relates to.
350<p> The tip will not reappear if the cursor moves back; your
351<a href="#maybeTip">maybeTip</a>() must reinstate it each time.
352<p> If the tip does not fit inside <em>geometry</em>, the tip expands.
353
354<h3 class=fn>void <a name="tip-4"></a>QToolTip::tip ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;rect, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;text, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;groupText, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;geometry )<tt> [protected]</tt>
355</h3>
356This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
357<p> Immediately pops up a tip within the rectangle <em>geometry</em>, saying
358<em>text</em> and removes the tip once the cursor moves out of rectangle
359<em>rect</em>. <em>groupText</em> is the text emitted from the group. Both
360rectangles are given in the coordinate system of the widget this
361QToolTip relates to.
362<p> The tip will not reappear if the cursor moves back; your
363<a href="#maybeTip">maybeTip</a>() must reinstate it each time.
364<p> If the tip does not fit inside <em>geometry</em>, the tip expands.
365
366<!-- eof -->
367<hr><p>
368This file is part of the <a href="index.html">Qt toolkit</a>.
369Copyright &copy; 1995-2007
370<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
371<table width=100% cellspacing=0 border=0><tr>
372<td>Copyright &copy; 2007
373<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
374<td align=right><div align=right>Qt 3.3.8</div>
375</table></div></address></body>
376</html>
Note: See TracBrowser for help on using the repository browser.