MenuBar QML Type | Qt Quick Controls 1 5.12.8

Qt 5.12 | Qt Quick Controls 1 | QML Types | MenuBar QML Type

Qt 5.12.8 Reference Documentation

# MenuBar QML Type

Provides a horizontal menu bar. More...

Import Statement: | import QtQuick.Controls 1.4
Since: | Qt 5.1

- List of all members, including inherited members

## Properties

- menus : list<Menu>
- style : Component

## Detailed Description

MenuBar can be added to an ApplicationWindow, providing menu options to access additional functionality of the application.

      ApplicationWindow {
          ...
          menuBar: MenuBar {
              Menu {
                  title: "File"
                  MenuItem { text: "Open..." }
                  MenuItem { text: "Close" }
              }

              Menu {
                  title: "Edit"
                  MenuItem { text: "Cut" }
                  MenuItem { text: "Copy" }
                  MenuItem { text: "Paste" }
              }
          }
      }

See also ApplicationWindow::menuBar.

## Property Documentation

[default] menus : list<Menu>

The list of menus in the menubar.

See also Menu.

style : Component

The style Component for this control.

This property was introduced in QtQuick.Controls.Styles 1.2.

See also MenuBarStyle.