以下成員源於類 QToolButton are part of the Qt compatibility layer. We advise against using them in new code.
| enum | TextPosition { BesideIcon, BelowIcon } |
| QToolButton (QWidget * parent , const char * name ) | |
| QToolButton (Qt::ArrowType type , QWidget * parent , const char * name ) | |
| QToolButton (const QIcon & icon , const QString & textLabel , const QString & statusTip , QObject * receiver , const char * slot , QWidget * parent , const char * name = 0) | |
| QIcon | iconSet () const |
| QIcon | offIconSet () const |
| QIcon | onIconSet () const |
| void | openPopup () |
| QMenu * | popup () const |
| int | popupDelay () const |
| void | setIconSet (const QIcon & icon ) |
| void | setPixmap (const QPixmap & pixmap ) |
| void | setPopup (QMenu * popup ) |
| void | setPopupDelay (int delay ) |
| void | setTextLabel (const QString & text , bool tooltip = true) |
| QString | textLabel () const |
| TextPosition | textPosition () const |
| bool | usesBigPixmap () const |
| bool | usesTextLabel () const |
| void | setTextPosition (QToolButton::TextPosition pos ) |
| void | setUsesBigPixmap (bool enable ) |
| void | setUsesTextLabel (bool enable ) |
This enum describes the position of the tool button's text label in relation to the tool button's icon.
| 常量 | 值 | 描述 |
|---|---|---|
QToolButton::BesideIcon
|
0
|
文本齣現在圖標旁邊。 |
QToolButton::BelowIcon
|
1
|
The text appears below the icon. |
Constructs an empty tool button called name ,采用父級 parent .
Constructs a tool button as an arrow button. The Qt::ArrowType type defines the arrow direction. Possible values are Qt::LeftArrow , Qt::RightArrow , Qt::UpArrow ,和 Qt::DownArrow .
An arrow button has auto-repeat turned on by default.
The parent and name arguments are sent to the QWidget 構造函數。
Constructs a tool button called name , that is a child of parent .
The tool button will display the given icon , with its text label and tool tip set to textLabel and its status bar message set to statusTip . It will be connected to the slot 在對象 receiver .
使用 icon () 代替。
另請參閱 setIconSet ().
使用 icon () 代替。
另請參閱 setOffIconSet ().
使用 icon () 代替。
另請參閱 setOnIconSet ().
使用 showMenu () 代替。
使用 menu () 代替。
另請參閱 setPopup ().
Use the style hint QStyle::SH_ToolButton_PopupDelay 代替。
另請參閱 setPopupDelay ().
使用 setIcon () 代替。
另請參閱 iconSet ().
使用 setIcon ( QIcon (pixmap)) instead.
使用 setMenu () 代替。
另請參閱 popup ().
Use the style hint QStyle::SH_ToolButton_PopupDelay 代替。
另請參閱 popupDelay ().
使用 setText () 和 setToolTip () 代替。
另請參閱 textLabel ().
[slot]
void
QToolButton::
setTextPosition
(
QToolButton::TextPosition
pos
)
使用 setToolButtonStyle () 代替。
另請參閱 textPosition ().
[slot]
void
QToolButton::
setUsesBigPixmap
(
bool
enable
)
使用 setIconSize () 代替。
另請參閱 usesBigPixmap ().
[slot]
void
QToolButton::
setUsesTextLabel
(
bool
enable
)
使用 setToolButtonStyle () 代替。
另請參閱 usesTextLabel ().
使用 text () 代替。
另請參閱 setTextLabel ().
使用 toolButtonStyle () 代替。
另請參閱 setTextPosition ().
使用 iconSize () 代替。
另請參閱 setUsesBigPixmap ().
使用 toolButtonStyle () 代替。
另請參閱 setUsesTextLabel ().