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

# QStyleOptionButton Class Reference

The QStyleOptionButton class is used to describe the parameters for drawing buttons. More...

    #include <QStyleOptionButton>

Part of the QtGui module.

Inherits QStyleOption.

- List of all members, including inherited members

### Public Types

- enum ButtonFeature { None, Flat, HasMenu, DefaultButton, AutoDefaultButton }
- flags ButtonFeatures

### Properties

- features : const ButtonFeatures
- icon : const QIcon
- text : const QString

- 5 properties inherited from QStyleOption

### Public Functions

- QStyleOptionButton ()
- QStyleOptionButton ( const QStyleOptionButton & other )

- 2 public functions inherited from QStyleOption

## Detailed Description

The QStyleOptionButton class is used to describe the parameters for drawing buttons.

The QStyleOptionButton class is used to draw QPushButton, QCheckBox, and QRadioButton.

See also QStyleOptionToolButton.

## Member Type Documentation

### enum QStyleOptionButton::ButtonFeature
flags QStyleOptionButton::ButtonFeatures

This enum describles the different types of features a push button can have.

Constant | Value | Description
--- | --- | ---
`QStyleOptionButton::None` | `0x00` | Indicates a normal push button.
`QStyleOptionButton::Flat` | `0x01` | Indicates a flat push button.
`QStyleOptionButton::HasMenu` | `0x02` | Indicates that the button has a drop down menu.
`QStyleOptionButton::DefaultButton` | `0x04` | Indicates that the button is a default button.
`QStyleOptionButton::AutoDefaultButton` | `0x08` | Indicates that the button is an auto default button.

The `ButtonFeatures` type stores an OR combination of `ButtonFeature` values.

See also features.

## Property Documentation

### features : const ButtonFeatures

This property holds the features for the button.

This variable is a bitwise OR of the features that describe this button.

See also ButtonFeature.

### icon : const QIcon

This property holds the icon of the button.

### text : const QString

This property holds the text of the button.

## Member Function Documentation

### QStyleOptionButton::QStyleOptionButton ()

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

### QStyleOptionButton::QStyleOptionButton ( const QStyleOptionButton & other )