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

📄 qtoolbutton.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
📖 第 1 页 / 共 2 页
字号:
'\" t.TH QToolButton 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQToolButton \- Quick-access button to commands or options, usually used inside a QToolBar.PP\fC#include <qtoolbutton.h>\fR.PPInherits QButton..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQToolButton\fR ( QWidget * parent, const char * name = 0 )".br.ti -1c.BI "\fBQToolButton\fR ( const QIconSet & iconSet, const QString & textLabel, const QString & grouptext, QObject * receiver, const char * slot, QToolBar * parent, const char * name = 0 )".br.ti -1c.BI "\fBQToolButton\fR ( ArrowType type, QWidget * parent, const char * name = 0 )".br.ti -1c.BI "\fB~QToolButton\fR ()".br.ti -1c.BI "void setOnIconSet ( const QIconSet & )  \fI(obsolete)\fR".br.ti -1c.BI "void setOffIconSet ( const QIconSet & )  \fI(obsolete)\fR".br.ti -1c.BI "void setIconSet ( const QIconSet & set, bool on )  \fI(obsolete)\fR".br.ti -1c.BI "QIconSet onIconSet () const  \fI(obsolete)\fR".br.ti -1c.BI "QIconSet offIconSet () const  \fI(obsolete)\fR".br.ti -1c.BI "QIconSet iconSet ( bool on ) const  \fI(obsolete)\fR".br.ti -1c.BI "virtual void \fBsetIconSet\fR ( const QIconSet & )".br.ti -1c.BI "QIconSet \fBiconSet\fR () const".br.ti -1c.BI "bool \fBusesBigPixmap\fR () const".br.ti -1c.BI "bool \fBusesTextLabel\fR () const".br.ti -1c.BI "QString \fBtextLabel\fR () const".br.ti -1c.BI "void \fBsetPopup\fR ( QPopupMenu * popup )".br.ti -1c.BI "QPopupMenu * \fBpopup\fR () const".br.ti -1c.BI "void \fBsetPopupDelay\fR ( int delay )".br.ti -1c.BI "int \fBpopupDelay\fR () const".br.ti -1c.BI "void \fBopenPopup\fR ()".br.ti -1c.BI "void \fBsetAutoRaise\fR ( bool enable )".br.ti -1c.BI "bool \fBautoRaise\fR () const".br.in -1c.SS "Public Slots".in +1c.ti -1c.BI "virtual void \fBsetUsesBigPixmap\fR ( bool enable )".br.ti -1c.BI "virtual void \fBsetUsesTextLabel\fR ( bool enable )".br.ti -1c.BI "virtual void \fBsetTextLabel\fR ( const QString & newLabel, bool tipToo )".br.ti -1c.BI "virtual void \fBsetToggleButton\fR ( bool enable )".br.ti -1c.BI "virtual void \fBsetOn\fR ( bool enable )".br.ti -1c.BI "void \fBtoggle\fR ()".br.ti -1c.BI "void \fBsetTextLabel\fR ( const QString & )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "bool \fBautoRaise\fR - whether auto-raising is enabled".br.ti -1c.BI "QIconSet \fBiconSet\fR - the icon set providing the icon shown on the button".br.ti -1c.BI "QIconSet offIconSet - the icon set that is used when the button is in an ""off"" state  \fI(obsolete)\fR".br.ti -1c.BI "bool \fBon\fR - whether this tool button is on".br.ti -1c.BI "QIconSet onIconSet - the icon set that is used when the button is in an ""on"" state  \fI(obsolete)\fR".br.ti -1c.BI "int \fBpopupDelay\fR - the time delay between pressing the button and the appearance of the associated popup menu in milliseconds".br.ti -1c.BI "QString \fBtextLabel\fR - the label of this button".br.ti -1c.BI "bool \fBtoggleButton\fR - whether this tool button is a toggle button".br.ti -1c.BI "bool \fBusesBigPixmap\fR - whether this toolbutton uses big pixmaps".br.ti -1c.BI "bool \fBusesTextLabel\fR - whether the toolbutton displays a text label below the button pixmap".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "bool \fBuses3D\fR () const".br.in -1c.SH DESCRIPTIONThe QToolButton class provides a quick-access button to commands or options, usually used inside a QToolBar..PPA tool button is a special button that provides quick-access to specific commands or options. As opposed to a normal command button, a tool button usually doesn't normally show a text label, but an icon. Its classic usage is to select tools, for example the "pen" tool in a drawing program. This would be implemented with a QToolButton as toggle button (see setToggleButton() )..PPQToolButton supports auto-raising. In auto-raise mode, the button draws a 3D frame only when the mouse points at it. The feature is automatically turned on when a button is used inside a QToolBar. Change it with setAutoRaise()..PPA tool button's icon is set as QIconSet. This makes it possible to specify different pixmaps for the disabled and active state. The disabled pixmap is used when the button's functionality is not available. The active pixmap is displayed when the button is auto-raised because the user is pointing at it..PPThe button's look and dimension is adjustable with setUsesBigPixmap() and setUsesTextLabel(). When used inside a QToolBar, the button automatically adjusts to QMainWindow's settings (see QMainWindow::setUsesTextLabel() and QMainWindow::setUsesBigPixmaps())..PPA tool button can offer additional choices in a popup menu. The feature is sometimes used with the "Back" button in a web browser. After pressing the button down for awhile, a menu pops up showing all possible pages to browse back. With QToolButton you can set a popup menu using setPopup(). The default delay is 600ms; you may adjust it with setPopupDelay()..PPSee also QPushButton, QToolBar, QMainWindow, GUI Design Handbook: Push Button and Basic Widgets..SH MEMBER FUNCTION DOCUMENTATION.SH "QToolButton::QToolButton ( QWidget * parent, const char * name = 0 )"Constructs an empty tool button with parent \fIparent\fR and name \fIname\fR..SH "QToolButton::QToolButton ( const QIconSet & iconSet, const QString & textLabel, const QString & grouptext, QObject * receiver, const char * slot, QToolBar * parent, const char * name = 0 )"Constructs a tool button that is a child of \fIparent\fR (which must be a QToolBar) and named \fIname\fR..PPThe tool button will display \fIiconSet\fR, with its text label and tool tip set to \fItextLabel\fR and its status bar message set to \fIgrouptext\fR. It will be connected to the \fIslot\fR in object \fIreceiver\fR..SH "QToolButton::QToolButton ( ArrowType type, QWidget * parent, const char * name = 0 )"Constructs a tool button as an arrow button. The ArrowType \fItype\fR defines the arrow direction. Possible values are LeftArrow, RightArrow, UpArrow and DownArrow..PPAn arrow button has auto-repeat turned on by default..PPThe \fIparent\fR and \fIname\fR arguments are sent to the QWidget constructor..SH "QToolButton::~QToolButton ()"Destroys the object and frees any allocated resources..SH "bool QToolButton::autoRaise () const"Returns TRUE if auto-raising is enabled; otherwise returns FALSE. See the "autoRaise" property for details..SH "QIconSet QToolButton::iconSet () const"Returns the icon set providing the icon shown on the button. See the "iconSet" property for details..SH "QIconSet QToolButton::iconSet ( bool on ) const"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..PP

⌨️ 快捷键说明

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