⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qtooltip.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.PP\fBWarning:\fR QToolTip is not a subclass of QObject, so the instance of QToolTip is not deleted when \fIwidget\fR is deleted..PPSee also maybeTip()..SH "void QToolTip::add ( QWidget * widget, const QString & text )\fC [static]\fR"Adds a tool tip to \fIwidget\fR. \fItext\fR is the text to be shown in the tool tip..PPThis is the most common entry point to the QToolTip class; it is suitable for adding tool tips to buttons, check boxes, combo boxes and so on..PPExamples:.)l qdir/qdir.cpp, scribble/scribble.cpp, and tooltip/tooltip.cpp..SH "void QToolTip::add ( QWidget * widget, const QString & text, QToolTipGroup * group, const QString & longText )\fC [static]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPAdds a tool tip to \fIwidget\fR and to tool tip group \fIgroup\fR..PP\fItext\fR is the text shown in the tool tip and \fIlongText\fR is the text emitted from \fIgroup\fR..PPNormally, \fIlongText\fR is shown in a status bar or similar..SH "void QToolTip::add ( QWidget * widget, const QRect & rect, const QString & text )\fC [static]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPAdds a tool tip to a fixed rectangle, \fIrect\fR, within \fIwidget\fR. \fItext\fR is the text shown in the tool tip..SH "void QToolTip::add ( QWidget * widget, const QRect & rect, const QString & text, QToolTipGroup * group, const QString & groupText )\fC [static]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPAdds a tool tip to an entire \fIwidget\fR and to tool tip group \fIgroup\fR. The tooltip will disappear when the mouse leaves the \fIrect\fR..PP\fItext\fR is the text shown in the tool tip and \fIgroupText\fR is the text emitted from \fIgroup\fR..PPNormally, \fIgroupText\fR is shown in a status bar or similar..SH "void QToolTip::clear ()\fC [protected]\fR"Immediately removes all tool tips for this tooltip's parent widget..SH "bool QToolTip::enabled ()\fC [static]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "QFont QToolTip::font ()\fC [static]\fR"Returns the font common to all tool tips..PPSee also setFont()..SH "QToolTipGroup * QToolTip::group () const"Returns the tool tip group this QToolTip is a member of or 0 if it isn't a member of any group..PPThe tool tip group is the object responsible for maintaining contact between tool tips and a status bar or something else which can show the longer help text..PPSee also parentWidget() and QToolTipGroup..SH "void QToolTip::hide ()\fC [static]\fR"Hides any tip that is currently being shown..PPNormally, there is no need to call this function; QToolTip takes care of showing and hiding the tips as the user moves the mouse..SH "bool QToolTip::isGloballyEnabled ()\fC [static]\fR"Returns whether tool tips are enabled globally..PPSee also setGloballyEnabled()..SH "void QToolTip::maybeTip ( const QPoint & p )\fC [pure virtual protected]\fR"This pure virtual function is half of the most versatile interface QToolTip offers..PPIt is called when there is a possibility that a tool tip should be shown and must decide whether there is a tool tip for the point \fIp\fR in the widget that this QToolTip object relates to. If so, maybeTip() must call tip() with the rectangle the tip applies to, the tip's text and optionally the QToolTipGroup details and the geometry in screen coordinates..PP\fIp\fR is given in that widget's local coordinates. Most maybeTip() implementations will be of the form:.PP.nf.br        if ( <something> ) {.br            tip( <something>, <something> );.br        }.br.fi.PPThe first argument to tip() (a rectangle) must encompass \fIp\fR, i.e. the tip must apply to the current mouse position; otherwise QToolTip's operation is undefined..PPNote that the tip will disappear once the mouse moves outside the rectangle you give to tip(), and will not reappear if the mouse moves back in: maybeTip() is called again instead..PPSee also tip()..PPExample: tooltip/tooltip.cpp..SH "QPalette QToolTip::palette ()\fC [static]\fR"Returns the palette common to all tool tips..PPSee also setPalette()..SH "QWidget * QToolTip::parentWidget () const"Returns the widget this QToolTip applies to..PPThe tool tip is destroyed automatically when the parent widget is destroyed..PPSee also group()..SH "void QToolTip::remove ( QWidget * widget )\fC [static]\fR"Removes the tool tip from \fIwidget\fR..PPIf there is more than one tool tip on \fIwidget\fR, only the one covering the entire widget is removed..SH "void QToolTip::remove ( QWidget * widget, const QRect & rect )\fC [static]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPRemoves the tool tip for \fIrect\fR from \fIwidget\fR..PPIf there is more than one tool tip on \fIwidget\fR, only the one covering rectangle \fIrect\fR is removed..SH "void QToolTip::setEnabled ( bool enable )\fC [static]\fR"\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..SH "void QToolTip::setFont ( const QFont & font )\fC [static]\fR"Sets the font for all tool tips to \fIfont\fR..PPSee also font()..SH "void QToolTip::setGloballyEnabled ( bool enable )\fC [static]\fR"If \fIenable\fR is TRUE sets all tool tips to be enabled (shown when needed); if \fIenable\fR is FALSE sets all tool tips to be disabled (never shown)..PPBy default, tool tips are enabled. Note that this function affects all tool tips in the entire application..PPSee also QToolTipGroup::enabled..SH "void QToolTip::setPalette ( const QPalette & palette )\fC [static]\fR"Sets the palette for all tool tips to \fIpalette\fR..PPSee also palette()..SH "void QToolTip::setWakeUpDelay ( int i )\fC [static]\fR"Sets the wakeup delay for all tooltips to \fIi\fR..SH "QString QToolTip::textFor ( QWidget * widget, const QPoint & pos = QPoint ( ) )\fC [static]\fR"Returns the tool tip text for \fIwidget\fR at position \fIpos\fR, or QString::null if there is no tool tip for the given widget and position..SH "void QToolTip::tip ( const QRect & rect, const QString & text )\fC [protected]\fR"Immediately pops up a tip saying \fItext\fR and removes the tip once the cursor moves out of rectangle \fIrect\fR (which is given in the coordinate system of the widget this QToolTip relates to)..PPThe tip will not reappear if the cursor moves back; your maybeTip() must reinstate it each time..SH "void QToolTip::tip ( const QRect & rect, const QString & text, const QString & groupText )\fC [protected]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPImmediately pops up a tip saying \fItext\fR and removes that tip once the cursor moves out of rectangle \fIrect\fR (which is given in the coordinate system of the widget this QToolTip relates to). \fIgroupText\fR is the text emitted from the group..PPThe tip will not reappear if the cursor moves back; your maybeTip() must reinstate it each time..SH "void QToolTip::tip ( const QRect & rect, const QString & text, const QRect & geometry )\fC [protected]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPImmediately pops up a tip within the rectangle \fIgeometry\fR, saying \fItext\fR and removes the tip once the cursor moves out of rectangle \fIrect\fR. Both rectangles are given in the coordinate system of the widget this QToolTip relates to..PPThe tip will not reappear if the cursor moves back; your maybeTip() must reinstate it each time..PPIf the tip does not fit inside \fIgeometry\fR, the tip expands..SH "void QToolTip::tip ( const QRect & rect, const QString & text, const QString & groupText, const QRect & geometry )\fC [protected]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPmmediately pops up a tip within the rectangle \fIgeometry\fR, saying \fItext\fR and removes the tip once the cursor moves out of rectangle \fIrect\fR. \fIgroupText\fR is the text emitted from the group. Both rectangles are given in the coordinate system of the widget this QToolTip relates to..PPThe tip will not reappear if the cursor moves back; your maybeTip() must reinstate it each time..PPIf the tip does not fit inside \fIgeometry\fR, the tip expands..SH "SEE ALSO".BR http://doc.trolltech.com/qtooltip.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qtooltip.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -