Ubuntu.Components.MenuBar
MenuBar defines an application menu bar structure More...
Import Statement: | import Ubuntu.Components 1.3 |
Properties
- menus : list<Menu>
Methods
- void appendMenu(Menu menu)
- void insertMenu(int index, Menu menu)
- void removeMenu(Menu menu)
Detailed Description
Example usage:
import QtQuick 2.4 import Ubuntu.Components 1.3 MainView { MenuBar { Menu { text: "_File" MenuItem { text: "_New" shortcut: "Ctrl+N" } MenuItem { text: "_Open" shortcut: "Ctrl+O" } MenuSeparator {} MenuItem { action: exitAction } } Menu { text: "_Edit" MenuItem { text: "_Undo" iconSource: "image://theme/undo" } } Menu { text: "_Window" MenuItem { text: "Fullscreen" checkable: true checked: false } } } Action { id: boundAction text: "E_xit" onTriggered: { Qt.quit(); } } }
Property Documentation
[default] menus : list<Menu> |
List of Menus in this MenuBar.
Method Documentation
void appendMenu(Menu menu) |
* Append a Menu to the MenuBar
void insertMenu(int index, Menu menu) |
* Insert a Menu to the MenuBar at the specified position
void removeMenu(Menu menu) |
* * Remove a Menu from the MenuBar