Menu QML Type
Menu defines a context menu or submenu structure of a MenuBar. More...
Import Statement: | import Lomiri.Components.Labs 1.3 |
Properties
- data : list<Object>
Methods
- appendObject(object o)
- dismiss()
- insertObject(int index, object o)
- removeObject(object o)
- show(point point)
Detailed Description
Example usage:
import QtQuick 2.4 import Lomiri.Components 1.3 import Lomiri.Components.Labs 1.0 Menu { text: "&File" MenuGroup { Action { text: "&New" shortcut: "Ctrl+N" } Action { text: "&Open" shortcut: "Ctrl+O" } } Menu { text: "Recent Files" ActionList { Action { text: "1.txt" } Action { text: "2.txt" } Action { text: "3.txt" } } } Action { action: Action { text: "E&xit" shortcut: "Ctrl+X" } } }
Property Documentation
[default] data : list<Object> |
List of objects representing menu items within the menu.
Currently supports Menu, Action, AcionList & MenuGroup objects.
Note: Item object which do not support platformItem will not be exported for native menus.
Method Documentation
insertObject(int index, object o) |
Inserts an item at the index in the menu.
Currently supports Menu, Action, AcionList & MenuGroup objects.
Note: Item object which do not support platformItem will not be exported for native menus.
show(point point) |
Show the menu popup at the given point