|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QStyleOptionToolButton Class Reference
[QtGui module]

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button. More...

    #include <QStyleOptionToolButton>

Inherits QStyleOptionComplex.

- List of all members, including inherited members

### Public Types

- enum ToolButtonFeature { None, Arrow, Menu, PopupDelay }
- flags ToolButtonFeatures

### Public Functions

- QStyleOptionToolButton ()
- QStyleOptionToolButton ( const QStyleOptionToolButton & other )

- 2 public functions inherited from QStyleOption

### Public Variables

- Qt::ArrowType arrowType
- ToolButtonFeatures features
- QFont font
- QIcon icon
- QSize iconSize
- QPoint pos
- QString text
- Qt::ToolButtonStyle toolButtonStyle

- 2 public variables inherited from QStyleOptionComplex
- 7 public variables inherited from QStyleOption

### Static Public Members

- const int Type
- const int Version

- 2 static public members inherited from QStyleOptionComplex
- 2 static public members inherited from QStyleOption

## Detailed Description

The QStyleOptionToolButton class is used to describe the parameters for drawing a tool button.

The QStyleOptionToolButton class is used for drawing QToolButton.

## Member Type Documentation

### enum QStyleOptionToolButton::ToolButtonFeature
flags QStyleOptionToolButton::ToolButtonFeatures

Describes the various features that a tool button can have.

Constant | Value | Description
--- | --- | ---
`QStyleOptionToolButton::None` | `0x00` | A normal tool button.
`QStyleOptionToolButton::Arrow` | `0x01` | The tool button is an arrow.
`QStyleOptionToolButton::Menu` | `0x04` | The tool button has a menu.
`QStyleOptionToolButton::PopupDelay` | `0x08` | There is a delay to showing the menu.

The ToolButtonFeatures type is a typedef for QFlags<ToolButtonFeature>. It stores an OR combination of ToolButtonFeature values.

See also features, QToolButton::toolButtonStyle(), and QToolButton::popupMode().

## Member Function Documentation

### QStyleOptionToolButton::QStyleOptionToolButton ()

Constructs a QStyleOptionToolButton. The members variables are initialized to default values.

### QStyleOptionToolButton::QStyleOptionToolButton ( const QStyleOptionToolButton & other )

Constructs a copy of the other style option.

## Member Variable Documentation

### const int QStyleOptionToolButton::Type

Equals SO_ToolButton.

### const int QStyleOptionToolButton::Version

Equals 1.

### Qt::ArrowType QStyleOptionToolButton::arrowType

This variable holds the direction of the arrow for the tool button.

This value is only used if features includes Arrow.

### ToolButtonFeatures QStyleOptionToolButton::features

This variable holds the features of the tool button.

This variable is a bitwise OR describing the features of the button.

See also ToolButtonFeature.

### QFont QStyleOptionToolButton::font

This variable holds the font that is used for the text.

This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly

### QIcon QStyleOptionToolButton::icon

This variable holds the icon for the tool button.

See also iconSize.

### QSize QStyleOptionToolButton::iconSize

This variable holds the size of the icon for the tool button.

### QPoint QStyleOptionToolButton::pos

This variable holds the position of the tool button.

### QString QStyleOptionToolButton::text

This variable holds the text of the tool button.

This value is only used if toolButtonStyle is Qt::ToolButtonTextUnderIcon, Qt::ToolButtonTextBesideIcon, or Qt::ToolButtonTextOnly

### Qt::ToolButtonStyle QStyleOptionToolButton::toolButtonStyle

This variable holds used to describe the appearance of a tool button.

See also QToolButton::toolButtonStyle().