ToolButtonΒΆ
Inherited: Button
DescriptionΒΆ
The ToolButton class provides a UI component with a button-like appearance and an associated popup menu. It extends the functionality of AbstractButton to handle menu-related features. Users can show and hide the menu associated with the ToolButton, and the class also provides functionality to update the button text based on menu selections.
Public MethodsΒΆ
Static MethodsΒΆ
None
Methods DescriptionΒΆ
void ToolButton::hideMenu ()
Hides the associated popup menu.
Menu * ToolButton::menu () const
Returns the associated menu, or nullptr if no menu has been defined.
See also setMenu().
void ToolButton::setMenu (Menu * menu)
Associates the given menu with this tool button. Ownership of the menu is not transferred to the tool button.
See also menu().
void ToolButton::showMenu ()
Shows the associated popup menu. Does nothing if no menu is associated.