Qt Components Hildon  0.20
QML components for Maemo5 with Hildon styling.
 All Classes Functions Properties Groups Pages
Public Slots | Properties | List of all members
MenuBar Class Reference

A container for menu items in a Window. More...

Public Slots

MenuItemaddFilter (string text)
 Adds a MenuItem filter with text and returns it.
MenuItem addItem (string text)
 Adds a MenuItem with text and returns it.
MenuIteminsertFilter (int before, string text)
 Inserts a MenuItem filter with text before the item at index before and returns it.
MenuItem insertItem (int before, string text)
 Inserts a MenuItem with text before the item at index before and returns it.
void removeItem (object item)
 Removes the item from the menu.

Properties

list< object > filters
 The filters of the menu bar.
bool filtersExclusive
 Whether enabling a filter disables the remaining filters.
list< object > items
 The items of the menu bar.

Detailed Description

A container for menu items in a Window.

The MenuBar component is used as a container for adding menu items to a Window.

menuBar: MenuBar {
MenuItem {
checkable: true
text: qsTr("Filter One")
onTriggered: console.log(qsTr("Filter One selected"))
},
MenuItem {
checkable: true
text: qsTr("Filter Two")
onTriggered: console.log(qsTr("Filter Two selected"))
}
]
MenuItem {
text: qsTr("MenuItem One")
onTriggered: console.log(qsTr("MenuItem One triggered"))
}
MenuItem {
text: qsTr("MenuItem Two")
onTriggered: console.log(qsTr("MenuItem Two triggered"))
}
MenuItem {
text: qsTr("Menu CheckBox")
}
}
MenuItem {
Slider {}
}
}
See Also
MenuItem, Window
Examples:
actions.qml, menus.qml, and tabs.qml.

Property Documentation

bool MenuBar::filtersExclusive
readwrite

Whether enabling a filter disables the remaining filters.

The default value is true.