Menu

Search for usage in LXR

Menu Class Reference

#include <qmenu.h>

Detailed Description

An Item provides a menu for use in context specific situations.

You can specify the position for the menu to open by setting its visualParent. MenuItems should be used to draw entries in the menu. The open() function opens up the menu at the given visualParent.

Example usage:

import org.kde.plasma.components 2.0 as PlasmaComponents
[...]
PlasmaComponents.Menu {
id: menu
...
PlasmaComponents.MenuItem {
text: "Delete"
onClicked: {
myListItem.remove();
}
}
}
PlasmaComponents.Button {
id: btn
onClicked: {
menu.visualParent = btn
menu.open()
}
}
[...]

Definition at line 19 of file qmenu.h.


The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Oct 24 2021 22:42:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.