How can I use Menubars in QtQuick Controls 2? It used to be (in ApplicationWindow):
menuBar: MenuBar { Menu { title: qsTr('File') MenuItem { text: qsTr('&Test') onTriggered: console.log('test') } MenuItem { text: qsTr('&Exit') onTriggered: Qt.quit(); } } }
But after upgrading to Qt 5.7, it gives this error: Invalid property name "menuBar".(M16)
PS it was used to use the device’s own menu system, for example, in OS X it used its own top-level screen screen, in Linux and Windows it used the built-in topbar in the application bar, etc.
qt qml qtquick2 qtquickcontrols2
Sassan
source share