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

📄 qpushbutton.3qt

📁 Trolltech公司发布的基于C++图形开发环境
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.SH "QPushButton::~QPushButton ()"Destroys the push button..SH "QKeySequence QButton::accel () const"Returns the accelerator associated with the button. See the "accel" property for details..SH "bool QPushButton::autoDefault () const"Returns TRUE if the push button is the auto default button; otherwise returns FALSE. See the "autoDefault" property for details..SH "bool QButton::autoRepeat () const"Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. See the "autoRepeat" property for details..SH "void QButton::clicked ()\fC [signal]\fR"This signal is emitted when the button is activated (i.e. first pressed down and then released when the mouse cursor is inside the button), when the accelerator key is typed or when animateClick() is called. This signal is \fInot\fR emitted if you call setDown()..PPThe QButtonGroup::clicked() signal does the same job, if you want to connect several buttons to the same slot..PP\fBWarning:\fR Don't launch a model dialog in response to this signal for a button that has autoRepeat turned on..PPSee also pressed(), released(), toggled(), autoRepeat, and down..PPExamples:.)l chart/setdataform.cpp, listbox/listbox.cpp, network/clientserver/client/client.cpp, progressbar/progressbar.cpp, richtext/richtext.cpp, t2/main.cpp, and t4/main.cpp..SH "QButtonGroup * QButton::group () const"Returns the group that this button belongs to..PPIf the button is not a member of any QButtonGroup, this function returns 0..PPSee also QButtonGroup..SH "QIconSet * QPushButton::iconSet () const"Returns the icon set on the push button. See the "iconSet" property for details..SH "bool QPushButton::isDefault () const"Returns TRUE if the push button is the default button; otherwise returns FALSE. See the "default" property for details..SH "bool QButton::isDown () const"Returns TRUE if the button is pressed; otherwise returns FALSE. See the "down" property for details..SH "bool QButton::isExclusiveToggle () const"Returns TRUE if the button is an exclusive toggle; otherwise returns FALSE. See the "exclusiveToggle" property for details..SH "bool QPushButton::isFlat () const"Returns TRUE if the border is disabled; otherwise returns FALSE. See the "flat" property for details..SH "bool QPushButton::isMenuButton () const"Returns TRUE if the push button has a menu button on it; otherwise returns FALSE. See the "menuButton" property for details..SH "bool QButton::isOn () const"Returns TRUE if the button is toggled; otherwise returns FALSE. See the "on" property for details..SH "bool QButton::isToggleButton () const"Returns TRUE if the button is a toggle button; otherwise returns FALSE. See the "toggleButton" property for details..SH "const QPixmap * QButton::pixmap () const"Returns the pixmap shown on the button. See the "pixmap" property for details..SH "QPopupMenu * QPushButton::popup () const"Returns the button's associated popup menu or 0 if no popup menu has been set..PPSee also setPopup()..SH "void QButton::pressed ()\fC [signal]\fR"This signal is emitted when the button is pressed down..PPSee also released() and clicked()..PPExamples:.)l network/httpd/httpd.cpp and popup/popup.cpp..SH "void QButton::released ()\fC [signal]\fR"This signal is emitted when the button is released..PPSee also pressed(), clicked(), and toggled()..SH "void QButton::setAccel ( const QKeySequence & )\fC [virtual]\fR"Sets the accelerator associated with the button. See the "accel" property for details..SH "void QPushButton::setAutoDefault ( bool autoDef )\fC [virtual]\fR"Sets whether the push button is the auto default button to \fIautoDef\fR. See the "autoDefault" property for details..SH "void QButton::setAutoRepeat ( bool )\fC [virtual]\fR"Sets whether autoRepeat is enabled. See the "autoRepeat" property for details..SH "void QPushButton::setDefault ( bool def )\fC [virtual]\fR"Sets whether the push button is the default button to \fIdef\fR. See the "default" property for details..SH "void QButton::setDown ( bool )\fC [virtual]\fR"Sets whether the button is pressed. See the "down" property for details..SH "void QPushButton::setFlat ( bool )"Sets whether the border is disabled. See the "flat" property for details..SH "void QPushButton::setIconSet ( const QIconSet & )"Sets the icon set on the push button. See the "iconSet" property for details..SH "void QPushButton::setIsMenuButton ( bool enable )\fC [virtual]\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 QPushButton::setOn ( bool )\fC [virtual slot]\fR"Sets whether the push button is toggled. See the "on" property for details..SH "void QButton::setPixmap ( const QPixmap & )\fC [virtual]\fR"Sets the pixmap shown on the button. See the "pixmap" property for details..SH "void QPushButton::setPopup ( QPopupMenu * popup )"Associates the popup menu \fIpopup\fR with this push button. This turns the button into a menu button..PPOwnership of the popup menu is \fInot\fR transferred to the push button..PPSee also popup()..PPExamples:.)l buttongroups/buttongroups.cpp and qdir/qdir.cpp..SH "void QButton::setText ( const QString & )\fC [virtual]\fR"Sets the text shown on the button. See the "text" property for details..SH "void QPushButton::setToggleButton ( bool )"Sets whether the button is a toggle button. See the "toggleButton" property for details..SH "ToggleState QButton::state () const"Returns the state of the toggle button. See the "toggleState" property for details..SH "void QButton::stateChanged ( int state )\fC [signal]\fR"This signal is emitted whenever a toggle button changes state. \fIstate\fR is On if the button is on, NoChange if it is in the" no change" state or Off if the button is off..PPThis may be the result of a user action, toggle() slot activation, setState(), or because setOn() was called..PPSee also clicked() and QButton::ToggleState..SH "QString QButton::text () const"Returns the text shown on the button. See the "text" property for details..SH "void QButton::toggle ()\fC [slot]\fR"Toggles the state of a toggle button..PPSee also on, on, toggled(), and toggleButton..SH "void QButton::toggled ( bool on )\fC [signal]\fR"This signal is emitted whenever a toggle button changes status. \fIon\fR is TRUE if the button is on, or FALSE if the button is off..PPThis may be the result of a user action, toggle() slot activation, or because setOn() was called..PPSee also clicked()..PPExample: listbox/listbox.cpp..SS "Property Documentation".SH "QKeySequence accel"This property holds the accelerator associated with the button..PPThis property is 0 if there is no accelerator set. If you set this property to 0 then any current accelerator is removed..PPSet this property's value with setAccel() and get this property's value with accel()..SH "bool autoDefault"This property holds whether the push button is the auto default button..PPIf this property is set to TRUE then the push button is the auto default button in a dialog..PPIn some GUI styles a default button is drawn with an extra frame around it, up to 3 pixels or more. Qt automatically keeps this space free around auto-default buttons, i.e. auto-default buttons may have a slightly larger size hint..PPThis property's default is TRUE for buttons that have a QDialog parent; otherwise it defaults to FALSE..PPSee the default property for details of how default and auto-default interact..PPSet this property's value with setAutoDefault() and get this property's value with autoDefault()..SH "bool autoMask"This property holds whether the button is automatically masked..PPSee also QWidget::autoMask..SH "bool autoRepeat"This property holds whether autoRepeat is enabled..PPIf autoRepeat is enabled then the clicked() signal is emitted at regular intervals if the button is down. This property has no effect on toggle buttons. autoRepeat is off by default..PPSet this property's value with setAutoRepeat() and get this property's value with autoRepeat()..SH "bool default"This property holds whether the push button is the default button..PPIf this property is set to TRUE then the push button will be pressed if the user presses the Enter (or Return) key in a dialog..PPRegardless of focus, if the user presses Enter: If there is a default button the default button is pressed; otherwise, if there are one or more autoDefault buttons the first autoDefault button that is next in the tab order is pressed. If there are no default or autoDefault buttons only pressing Space on a button with focus, mouse clicking, or using an accelerator will press a button..PPIn a dialog, only one push button at a time can be the default button. This button is then displayed with an additional frame (depending on the GUI style)..PPThe default button behavior is provided only in dialogs. Buttons can always be clicked from the keyboard by pressing Enter (or Return) or the Spacebar when the button has focus..PPThis property's default is FALSE..PPSet this property's value with setDefault() and get this property's value with isDefault()..SH "bool flat"This property holds whether the border is disabled..PPThis property's default is FALSE..PPSet this property's value with setFlat() and get this property's value with isFlat()..SH "QIconSet iconSet"This property holds the icon set on the push button..PPThis property will return 0 if the push button has no iconset..PPSet this property's value with setIconSet() and get this property's value with iconSet()..SH "bool menuButton"This property holds whether the push button has a menu button on it..PP\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPIf this property is set to TRUE, then a down arrow is drawn on the push button to indicate that a menu will pop up if the user clicks on the arrow..PPGet this property's value with isMenuButton()..SH "bool on"This property holds whether the push button is toggled..PPThis property should only be set for toggle push buttons. The default value is FALSE..PPSee also on, toggle(), toggled(), and toggleButton..PPSet this property's value with setOn()..SH "QPixmap pixmap"This property holds the pixmap shown on the button..PPIf the pixmap is monochrome (i.e. it is a QBitmap or its depth is 1) and it does not have a mask, this property will set the pixmap to be its own mask. The purpose of this is to draw transparent bitmaps which are important for toggle buttons, for example..PPpixmap() returns 0 if no pixmap was set..PPSet this property's value with setPixmap() and get this property's value with pixmap()..SH "QString text"This property holds the text shown on the button..PPThis property will return a QString::null if the button has no text. If the text has an ampersand (&) in it, then an accelerator is automatically created for it using the character that follows the '&' as the accelerator key. Any previous accelerator will be overwritten, or cleared if no accelerator is defined by the text..PPThere is no default text..PPSet this property's value with setText() and get this property's value with text()..SH "bool toggleButton"This property holds whether the button is a toggle button..PPToggle buttons have an on/off state similar to check boxes. A push button is initially not a toggle button..PPSee also on, toggle(), toggleButton, and toggled()..PPSet this property's value with setToggleButton()..SH "SEE ALSO".BR http://doc.trolltech.com/qpushbutton.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 (qpushbutton.3qt) and the Qtversion (3.3.4).

⌨️ 快捷键说明

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