# MenuBar QML Type

MenuBar defines an application menu bar structure. More...

Import Statement: | import Lomiri.Components.Labs 1.3

- List of all members, including inherited members

## 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 Lomiri.Components 1.3
    import Lomiri.Components.Labs 1.0
    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