以下成员源于类 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 ().