qtooltip.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 328 行 · 第 1/2 页
HTML
328 行
<p> Adds a tool tip to <em>widget</em> and to tool tip group <em>group</em>.<p> <em>text</em> is the text shown in the tool tip and <em>longText</em> is thetext emitted from <em>group</em>.<p> Normally, <em>longText</em> is shown in a status bar or similar.<h3 class=fn>void <a name="add-3"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a> * widget, const <a href="qrect.html">QRect</a> & rect, const <a href="qstring.html">QString</a> & text )<tt> [static]</tt></h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Adds a tool tip to a fixed rectangle, <em>rect</em>, within <em>widget</em>. <em>text</em> is the text shown in the tool tip.<h3 class=fn>void <a name="add-4"></a>QToolTip::add ( <a href="qwidget.html">QWidget</a> * widget, const <a href="qrect.html">QRect</a> & rect, const <a href="qstring.html">QString</a> & text, <a href="qtooltipgroup.html">QToolTipGroup</a> * group, const <a href="qstring.html">QString</a> & groupText )<tt> [static]</tt></h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<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>.<p> <em>text</em> is the text shown in the tool tip and <em>groupText</em> is thetext emitted from <em>group</em>.<p> Normally, <em>groupText</em> is shown in a status bar or similar.<h3 class=fn>void <a name="clear"></a>QToolTip::clear ()<tt> [protected]</tt></h3>Immediately removes all tool tips for this tooltip's parent widget.<h3 class=fn>bool <a name="enabled"></a>QToolTip::enabled ()<tt> [static]</tt></h3><p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.<p> <h3 class=fn><a href="qfont.html">QFont</a> <a name="font"></a>QToolTip::font ()<tt> [static]</tt></h3>Returns the font common to all tool tips.<p>See also <a href="#setFont">setFont</a>().<h3 class=fn><a href="qtooltipgroup.html">QToolTipGroup</a> * <a name="group"></a>QToolTip::group () const</h3><p> Returns the tool tip group this QToolTip is a member of or 0 if itisn't a member of any group.<p> The tool tip group is the object responsible for maintaining contactbetween tool tips and a status bar or something else which can showthe longer help text.<p> <p>See also <a href="#parentWidget">parentWidget</a>() and <a href="qtooltipgroup.html">QToolTipGroup</a>.<h3 class=fn>void <a name="hide"></a>QToolTip::hide ()<tt> [static]</tt></h3>Hides any tip that is currently being shown.<p> Normally, there is no need to call this function; QToolTip takescare of showing and hiding the tips as the user moves the mouse.<h3 class=fn>bool <a name="isGloballyEnabled"></a>QToolTip::isGloballyEnabled ()<tt> [static]</tt></h3>Returns whether tool tips are enabled globally.<p>See also <a href="#setGloballyEnabled">setGloballyEnabled</a>().<h3 class=fn>void <a name="maybeTip"></a>QToolTip::maybeTip ( const <a href="qpoint.html">QPoint</a> & p )<tt> [pure virtual protected]</tt></h3><p> This pure virtual function is half of the most versatile interfaceQToolTip offers.<p> It is called when there is a possibility that a tool tip should beshown 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,<a href="#maybeTip">maybeTip</a>() must call <a href="#tip">tip</a>() with the rectangle the tip applies to,the tip's text and optionally the <a href="qtooltipgroup.html">QToolTipGroup</a> details.<p> <em>p</em> is given in that widget's local coordinates. Most maybeTip()implementations will be of the form:<p> <pre> if ( <something> ) { <a href="#tip">tip</a>( <something>, <something> ); } </pre> <p> The first argument to tip() (a rectangle) must encompass <em>p</em>, i.e.the tip must apply to the current mouse position; otherwiseQToolTip's operation is undefined.<p> Note that the tip will disappear once the mouse moves outside therectangle you give to tip(), and will not reappear if the mouse movesback in - maybeTip() is called again instead.<p> <p>See also <a href="#tip">tip</a>().<p>Example: <a href="tooltip-example.html#x570">tooltip/tooltip.cpp</a>.<h3 class=fn><a href="qpalette.html">QPalette</a> <a name="palette"></a>QToolTip::palette ()<tt> [static]</tt></h3>Returns the palette common to all tool tips.<p>See also <a href="#setPalette">setPalette</a>().<h3 class=fn><a href="qwidget.html">QWidget</a> * <a name="parentWidget"></a>QToolTip::parentWidget () const</h3><p> Returns the widget this QToolTip applies to.<p> The tool tip is destroyed automatically when the parent widget isdestroyed.<p> <p>See also <a href="#group">group</a>().<h3 class=fn>void <a name="remove"></a>QToolTip::remove ( <a href="qwidget.html">QWidget</a> * widget )<tt> [static]</tt></h3>Removes the tool tip from <em>widget</em>.<p> If there is more than one tool tip on <em>widget</em>, only the onecovering the entire widget is removed.<h3 class=fn>void <a name="remove-2"></a>QToolTip::remove ( <a href="qwidget.html">QWidget</a> * widget, const <a href="qrect.html">QRect</a> & rect )<tt> [static]</tt></h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Removes the tool tip for <em>rect</em> from <em>widget</em>.<p> If there is more than one tool tip on <em>widget</em>, only the onecovering rectangle <em>rect</em> is removed.<h3 class=fn>void <a name="setEnabled"></a>QToolTip::setEnabled ( bool enable )<tt> [static]</tt></h3><p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.<p> <h3 class=fn>void <a name="setFont"></a>QToolTip::setFont ( const <a href="qfont.html">QFont</a> & font )<tt> [static]</tt></h3>Sets the font for all tool tips to <em>font</em>.<p>See also <a href="#font">font</a>().<h3 class=fn>void <a name="setGloballyEnabled"></a>QToolTip::setGloballyEnabled ( bool enable )<tt> [static]</tt></h3>If <em>enable</em> is TRUE sets all tool tips to be enabled (shown whenneeded); if <em>enable</em> is FALSE sets all tool tips to be disabled(never shown).<p> By default, tool tips are enabled. Note that this functionaffects all tool tips in the entire application.<p> <p>See also <a href="qtooltipgroup.html#enabled-prop">QToolTipGroup::enabled</a>.<h3 class=fn>void <a name="setPalette"></a>QToolTip::setPalette ( const <a href="qpalette.html">QPalette</a> & palette )<tt> [static]</tt></h3>Sets the palette for all tool tips to <em>palette</em>.<p>See also <a href="#palette">palette</a>().<h3 class=fn><a href="qstring.html">QString</a> <a name="textFor"></a>QToolTip::textFor ( <a href="qwidget.html">QWidget</a> * widget, const <a href="qpoint.html">QPoint</a> & pos = QPoint ( ) )<tt> [static]</tt></h3>Returns the text for <em>widget</em> at position <em>pos</em>, or a null stringif there is no tool tip for the <em>widget</em>.<h3 class=fn>void <a name="tip"></a>QToolTip::tip ( const <a href="qrect.html">QRect</a> & rect, const <a href="qstring.html">QString</a> & text )<tt> [protected]</tt></h3>Immediately pops up a tip saying <em>text</em> and removes the tip oncethe cursor moves out of rectangle <em>rect</em> (which is given in thecoordinate system of the widget this QToolTip relates to).<p> The tip will not reappear if the cursor moves back; your <a href="#maybeTip">maybeTip</a>()has to reinstate it each time.<h3 class=fn>void <a name="tip-2"></a>QToolTip::tip ( const <a href="qrect.html">QRect</a> & rect, const <a href="qstring.html">QString</a> & text, const <a href="qstring.html">QString</a> & groupText )<tt> [protected]</tt></h3>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.<p> Immediately pops up a tip saying <em>text</em> and removes that tip oncethe cursor moves out of rectangle <em>rect</em>. <em>groupText</em> is thetext emitted from the group.<p> The tip will not reappear if the cursor moves back; your <a href="#maybeTip">maybeTip</a>()has to reinstate it each time.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright © 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?