📄 qtoolbutton.3qt
字号:
Since Qt 3.0, QIconSet contains both the On and Off icons..PPFor ease of porting, this function ignores the \fIon\fR parameter and returns the iconSet property. If you relied on the \fIon\fR parameter, you probably want to update your code to use the QIconSet On/Off mechanism..SH "QIconSet QToolButton::offIconSet () const"Returns the icon set that is used when the button is in an "off" state. See the "offIconSet" property for details..SH "QIconSet QToolButton::onIconSet () const"Returns the icon set that is used when the button is in an "on" state. See the "onIconSet" property for details..SH "void QToolButton::openPopup ()"Opens (pops up) the associated popup menu. If there is no such menu, this function does nothing. This function does not return until the popup menu has been closed by the user..SH "QPopupMenu * QToolButton::popup () const"Returns the associated popup menu, or 0 if no popup menu has been defined..PPSee also setPopup()..SH "int QToolButton::popupDelay () const"Returns the time delay between pressing the button and the appearance of the associated popup menu in milliseconds. See the "popupDelay" property for details..SH "void QToolButton::setAutoRaise ( bool enable )"Sets whether auto-raising is enabled to \fIenable\fR. See the "autoRaise" property for details..SH "void QToolButton::setIconSet ( const QIconSet & )\fC [virtual]\fR"Sets the icon set providing the icon shown on the button. See the "iconSet" property for details..SH "void QToolButton::setIconSet ( const QIconSet & set, bool on )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PP\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPSince Qt 3.0, QIconSet contains both the On and Off icons..PPFor ease of porting, this function ignores the \fIon\fR parameter and sets the iconSet property. If you relied on the \fIon\fR parameter, you probably want to update your code to use the QIconSet On/Off mechanism..PPSee also iconSet and QIconSet::State..SH "void QToolButton::setOffIconSet ( const QIconSet & )"Sets the icon set that is used when the button is in an "off" state. See the "offIconSet" property for details..SH "void QToolButton::setOn ( bool enable )\fC [virtual slot]\fR"Sets whether this tool button is on to \fIenable\fR. See the "on" property for details..SH "void QToolButton::setOnIconSet ( const QIconSet & )"Sets the icon set that is used when the button is in an "on" state. See the "onIconSet" property for details..SH "void QToolButton::setPopup ( QPopupMenu * popup )"Associates the popup menu \fIpopup\fR with this tool button..PPThe popup will be shown each time the tool button has been pressed down for a certain amount of time. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user holds the button down for a while, the tool button shows a menu containing the current history list..PPOwnership of the popup menu is not transferred to the tool button..PPSee also popup()..SH "void QToolButton::setPopupDelay ( int delay )"Sets the time delay between pressing the button and the appearance of the associated popup menu in milliseconds to \fIdelay\fR. See the "popupDelay" property for details..SH "void QToolButton::setTextLabel ( const QString & )\fC [slot]\fR"Sets the label of this button. See the "textLabel" property for details..SH "void QToolButton::setTextLabel ( const QString & newLabel, bool tipToo )\fC [virtual slot]\fR"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets the label of this button to \fInewLabel\fR and automatically sets it as tool tip too if \fItipToo\fR is TRUE..SH "void QToolButton::setToggleButton ( bool enable )\fC [virtual slot]\fR"Sets whether this tool button is a toggle button to \fIenable\fR. See the "toggleButton" property for details..SH "void QToolButton::setUsesBigPixmap ( bool enable )\fC [virtual slot]\fR"Sets whether this toolbutton uses big pixmaps to \fIenable\fR. See the "usesBigPixmap" property for details..SH "void QToolButton::setUsesTextLabel ( bool enable )\fC [virtual slot]\fR"Sets whether the toolbutton displays a text label below the button pixmap to \fIenable\fR. See the "usesTextLabel" property for details..SH "QString QToolButton::textLabel () const"Returns the label of this button. See the "textLabel" property for details..SH "void QToolButton::toggle ()\fC [slot]\fR"Toggles the state of this tool button..PPThis function has no effect on non-toggling buttons..PPSee also toggleButton and toggled()..SH "bool QToolButton::uses3D () const\fC [protected]\fR"Returns TRUE if this button should be drawn using raised edges; otherwise returns FALSE..PPSee also drawButton()..SH "bool QToolButton::usesBigPixmap () const"Returns TRUE if this toolbutton uses big pixmaps; otherwise returns FALSE. See the "usesBigPixmap" property for details..SH "bool QToolButton::usesTextLabel () const"Returns TRUE if the toolbutton displays a text label below the button pixmap; otherwise returns FALSE. See the "usesTextLabel" property for details..SS "Property Documentation".SH "bool autoRaise"This property holds whether auto-raising is enabled..PPThe default is disabled (i.e. FALSE)..PPSet this property's value with setAutoRaise() and get this property's value with autoRaise()..SH "QIconSet iconSet"This property holds the icon set providing the icon shown on the button..PPSetting this property sets QToolButton::pixmap to a null pixmap..PPSee also pixmap, toggleButton and on..PPSet this property's value with setIconSet() and get this property's value with iconSet()..SH "QIconSet offIconSet"This property holds the icon set that is used when the button is in an "off" state..PP\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPSince Qt 3.0, QIconSet contains both the On and Off icons. There is now an QToolButton::iconSet property that replaces both QToolButton::onIconSet and QToolButton::offIconSet..PPFor ease of porting, this property is a synonym for QToolButton::iconSet. You probably want to go over your application code and use the QIconSet On/Off mechanism..PPSee also iconSet and QIconSet::State..PPSet this property's value with setOffIconSet() and get this property's value with offIconSet()..SH "bool on"This property holds whether this tool button is on..PPThis property has no effect on non-toggling buttons..PPSee also toggleButton and toggle()..PPSet this property's value with setOn()..SH "QIconSet onIconSet"This property holds the icon set that is used when the button is in an "on" state..PP\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPSince Qt 3.0, QIconSet contains both the On and Off icons. There is now an QToolButton::iconSet property that replaces both QToolButton::onIconSet and QToolButton::offIconSet..PPFor ease of porting, this property is a synonym for QToolButton::iconSet. You probably want to go over your application code and use the QIconSet On/Off mechanism..PPSee also iconSet and QIconSet::State..PPSet this property's value with setOnIconSet() and get this property's value with onIconSet()..SH "int popupDelay"This property holds the time delay between pressing the button and the appearance of the associated popup menu in milliseconds..PPUsually this is around half a second. A value of 0 will add a special section to the toolbutton that can be used to open the popupmenu..PPSee also setPopup()..PPSet this property's value with setPopupDelay() and get this property's value with popupDelay()..SH "QString textLabel"This property holds the label of this button..PPSetting this property automatically sets the text as tool tip too..PPSet this property's value with setTextLabel() and get this property's value with textLabel()..SH "bool toggleButton"This property holds whether this tool button is a toggle button..PPToggle buttons have an on/off state similar to check boxes. A tool button is not a toggle button by default..PPSee also on and toggle()..PPSet this property's value with setToggleButton()..SH "bool usesBigPixmap"This property holds whether this toolbutton uses big pixmaps..PPQToolButton automatically connects this property to the relevant signal in the QMainWindow in which it resides. We strongly recommend that you use QMainWindow::setUsesBigPixmaps() instead..PP\fBWarning:\fR If you set some buttons (in a QMainWindow) to have big pixmaps and others to have small pixmaps, QMainWindow may not get the geometry right..PPSet this property's value with setUsesBigPixmap() and get this property's value with usesBigPixmap()..SH "bool usesTextLabel"This property holds whether the toolbutton displays a text label below the button pixmap..PPThe default is FALSE..PPQToolButton automatically connects this slot to the relevant signal in the QMainWindow in which is resides..PPSet this property's value with setUsesTextLabel() and get this property's value with usesTextLabel()..SH "SEE ALSO".BR http://doc.trolltech.com/qtoolbutton.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 (qtoolbutton.3qt) and the Qtversion (3.0.0).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -