ModelContextMenu
ModelContextMenu Class Reference
Properties | |
alias | model |
Signals | |
void | clicked (var model) |
Detailed Description
A ModelContextMenu creates a context menu with items populated from a model or a QList<QAction*>.
For standard item models, actions are created using the following model role names or properties:
display
- a string contains the action namedecoration
- an icon to displayseparator
- boolean that will add a separator in the list
Example code:
id: menu
visualParent: someButton
model: myModel
}
Button {
id: someButton
onClicked: menu.popup()
}
A ModelContextMenu creates a context menu with items populated from a model or a QList<QAction*>.
Definition ModelContextMenu.qml:34
Definition at line 34 of file ModelContextMenu.qml.
Property Documentation
◆ model
|
read |
The model containing menu items.
Definition at line 39 of file ModelContextMenu.qml.
Member Function Documentation
◆ clicked
|
signal |
This signal is emitted when a menu item is clicked.
The attached model properties for that menu item are passed as an argument
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 Mon Nov 18 2024 12:10:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.