- Extending Qt Creator Manual
- QtCreator
- OptionPushButton
- Extending Qt Creator Manual 11.0.0-beta2

# OptionPushButton Class

class Utils::OptionPushButton

The OptionPushButton class implements a QPushButton for which the menu is only opened if the user presses the menu indicator. More...

Header: | #include <OptionPushButton>

## Detailed Description

Use OptionPushButton::setOptionalMenu() to set the menu and its actions. If the users clicks on the menu indicator of the push button, this menu is opened, and its actions are triggered when the user selects them.

If the user clicks anywhere else on the button, the QAbstractButton::clicked() signal is sent, as if the button didn't have a menu.

Note: You may not call QPushButton::setMenu(). Use OptionPushButton::setOptionalMenu() instead.