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

📄 qbutton.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.TP\fCQButton::Off\fR - the button is in the "off" state.TP\fCQButton::NoChange\fR - the button is in the default/unchanged state.TP\fCQButton::On\fR - the button is in the "on" state.SH "QButton::ToggleType"This enum type defines what a button can do in response to a mouse/keyboard press:.TP\fCQButton::SingleShot\fR - pressing the button causes an action, then the button returns to the unpressed state..TP\fCQButton::Toggle\fR - pressing the button toggles it between an On and an Off state..TP\fCQButton::Tristate\fR - pressing the button cycles between the three states On, Off and NoChange.SH MEMBER FUNCTION DOCUMENTATION.SH "QButton::QButton ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )"Constructs a standard button called \fIname\fR with parent \fIparent\fR, using the widget flags \fIf\fR..PPIf \fIparent\fR is a QButtonGroup, this constructor calls QButtonGroup::insert()..SH "QButton::~QButton ()"Destroys the button..SH "QKeySequence QButton::accel () const"Returns the accelerator associated with the button. See the "accel" property for details..SH "void QButton::animateClick ()\fC [slot]\fR"Performs an animated click: the button is pressed and released a short while later..PPThe pressed(), released(), clicked(), toggled(), and stateChanged() signals are emitted as appropriate..PPThis function does nothing if the button is disabled..PPSee also accel..SH "bool QButton::autoRepeat () const"Returns TRUE if autoRepeat is enabled; otherwise returns FALSE. See the "autoRepeat" property for details..SH "bool QButton::autoResize () const"Returns TRUE if autoResize is enabled; otherwise returns FALSE. See the "autoResize" 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..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 "void QButton::drawButton ( QPainter * )\fC [virtual protected]\fR"Draws the button. The default implementation does nothing..PPThis virtual function is reimplemented by subclasses to draw real buttons. At some point, these reimplementations should call drawButtonLabel()..PPSee also drawButtonLabel() and paintEvent()..SH "void QButton::drawButtonLabel ( QPainter * )\fC [virtual protected]\fR"Draws the button text or pixmap..PPThis virtual function is reimplemented by subclasses to draw real buttons. It is invoked by drawButton()..PPSee also drawButton() and paintEvent()..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 "bool QButton::hitButton ( const QPoint & pos ) const\fC [virtual protected]\fR"Returns TRUE if \fIpos\fR is inside the clickable button rectangle; otherwise returns FALSE..PPBy default, the clickable area is the entire widget. Subclasses may reimplement it, though..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 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 "void QButton::paintEvent ( QPaintEvent * )\fC [virtual protected]\fR"Handles paint events for buttons. Small and typically complex buttons are painted double-buffered to reduce flicker. The actually drawing is done in the virtual functions drawButton() and drawButtonLabel()..PPSee also drawButton() and drawButtonLabel()..PPReimplemented from QWidget..SH "const QPixmap * QButton::pixmap () const"Returns the pixmap shown on the button. See the "pixmap" property for details..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 QButton::setAutoRepeat ( bool )\fC [virtual]\fR"Sets whether autoRepeat is enabled. See the "autoRepeat" property for details..SH "void QButton::setAutoResize ( bool )"Sets whether autoResize is enabled. See the "autoResize" 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 QButton::setOn ( bool on )\fC [protected]\fR"Sets the state of this button to On if \fIon\fR is TRUE; otherwise to Off..PPSee also toggleState..SH "void QButton::setPixmap ( const QPixmap & )\fC [virtual]\fR"Sets the pixmap shown on the button. See the "pixmap" property for details..SH "void QButton::setState ( ToggleState s )\fC [virtual protected]\fR"Sets the toggle state of the button to \fIs\fR. \fIs\fR can be Off, NoChange or On..SH "void QButton::setText ( const QString & )\fC [virtual]\fR"Sets the text shown on the button. See the "text" property for details..SH "void QButton::setToggleButton ( bool b )\fC [protected]\fR"If \fIb\fR is TRUE, this button becomes a toggle button; if \fIb\fR is FALSE, this button becomes a command button..PPSee also toggleButton..SH "void QButton::setToggleType ( ToggleType type )\fC [virtual protected]\fR"Sets the toggle type of the button to \fItype\fR..PP\fItype\fR can be set to SingleShot, Toggle and Tristate..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, setOn(), toggled(), and toggleButton..SH "ToggleType QButton::toggleType () const"Returns the type of toggle on the button. See the "toggleType" property for details..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 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 autoResize"This property holds whether autoResize is enabled..PP\fBThis property is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code..PPIf autoResize is enabled then the button will resize itself whenever the contents are changed..PPSet this property's value with setAutoResize() and get this property's value with autoResize()..SH "bool down"This property holds whether the button is pressed..PPIf this property is TRUE, the button is pressed down. The signals pressed() and clicked() are not emitted if you set this property to TRUE. The default is FALSE..PPSet this property's value with setDown() and get this property's value with isDown()..SH "bool exclusiveToggle"This property holds whether the button is an exclusive toggle..PPIf this property is TRUE and the button is in a QButtonGroup, the button can only be toggled off by another one being toggled on. The default is FALSE..PPGet this property's value with isExclusiveToggle()..SH "bool on"This property holds whether the button is toggled..PPThis property should only be set for toggle buttons..PPGet this property's value with isOn()..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..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..PPThe default value is FALSE..PPGet this property's value with isToggleButton()..SH "ToggleState toggleState"This property holds the state of the toggle button..PPIf this property is changed then it does not cause the button to be repainted..PPGet this property's value with state()..SH "ToggleType toggleType"This property holds the type of toggle on the button..PPThe default toggle type is SingleShot..PPSee also QButton::ToggleType..PPGet this property's value with toggleType()..SH "SEE ALSO".BR http://doc.trolltech.com/qbutton.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 (qbutton.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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