ToolButtonMenu

Search for usage in LXR

ToolButtonMenu Class Reference
Inheritance diagram for ToolButtonMenu:

Properties

alias content
 
alias menu
 

Public Member Functions

void close ()
 
void open ()
 
void popup ()
 

Detailed Description

A control to host into a Menu popup, a set of MenuItem or Actions as its children.

Since
org.mauikit.controls 1.0

This control provides a quick way to have a menu attached to a tool button. All child items will be positioned inside a MauiKit ContextualMenu.

See also
ContextualMenu
Maui.ToolButtonMenu
{
icon.name: "overflow-menu"
MenuItem
{
text : "Menu1"
}
MenuItem
{
text : "Menu2"
}
MenuItem
{
text : "Menu3"
}
}

Definition at line 38 of file ToolButtonMenu.qml.

Property Documentation

◆ content

list< QtObject > ToolButtonMenu::content
read

List of items, such as MenuItem, or Action, to populate the contextual menu.

Remarks
This is the default property

This is the default property, so all the children will go into the menu.

Definition at line 46 of file ToolButtonMenu.qml.

◆ menu

ContextualMenu ToolButtonMenu::menu
read

Alias to the actual menu component holding the menu entries.

Remarks
This property is read-only

This can be modified for fine tuning the menu position or look.

Definition at line 53 of file ToolButtonMenu.qml.

Member Function Documentation

◆ close()

void ToolButtonMenu::close ( )

Forces to close the contextual menu.

◆ open()

void ToolButtonMenu::open ( )

Forces to open the contextual menu.

The menu will be positioned under the button. To open the menu at a position where it has been invoked, use the popup function instead.

See also
popup

◆ popup()

void ToolButtonMenu::popup ( )

Forces to popup the contextual menu.

This means the menu will be opened and positioned at the event coordinates.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.