
We bake cookies in your browser for a better experience. Using this site means that you consent.Read More
The following members of classQToolButtonare 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.
| Constant | Value | Description |
|---|---|---|
QToolButton::BesideIcon | 0 | The text appears beside the icon. |
QToolButton::BelowIcon | 1 | The text appears below the icon. |
Constructs an empty tool button calledname, with parentparent.
Constructs a tool button as an arrow button. TheQt::ArrowTypetype defines the arrow direction. Possible values areQt::LeftArrow,Qt::RightArrow,Qt::UpArrow, andQt::DownArrow.
An arrow button has auto-repeat turned on by default.
Theparent andname arguments are sent to theQWidget constructor.
Constructs a tool button calledname, that is a child ofparent.
The tool button will display the givenicon, with its text label and tool tip set totextLabel and its status bar message set tostatusTip. It will be connected to theslot in objectreceiver.
Useicon() instead.
See alsosetIconSet().
Useicon() instead.
See alsosetOffIconSet().
Useicon() instead.
See alsosetOnIconSet().
UseshowMenu() instead.
Usemenu() instead.
See alsosetPopup().
Use the style hintQStyle::SH_ToolButton_PopupDelay instead.
See alsosetPopupDelay().
UsesetIcon() instead.
See alsoiconSet().
UsesetIcon(QIcon(pixmap)) instead.
UsesetMenu() instead.
See alsopopup().
Use the style hintQStyle::SH_ToolButton_PopupDelay instead.
See alsopopupDelay().
UsesetText() andsetToolTip() instead.
See alsotextLabel().
[slot]void QToolButton::setTextPosition(QToolButton::TextPosition pos)UsesetToolButtonStyle() instead.
See alsotextPosition().
[slot]void QToolButton::setUsesBigPixmap(bool enable)UsesetIconSize() instead.
See alsousesBigPixmap().
[slot]void QToolButton::setUsesTextLabel(bool enable)UsesetToolButtonStyle() instead.
See alsousesTextLabel().
Usetext() instead.
See alsosetTextLabel().
UsetoolButtonStyle() instead.
See alsosetTextPosition().
UseiconSize() instead.
See alsosetUsesBigPixmap().
UsetoolButtonStyle() instead.
See alsosetUsesTextLabel().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.