I'm using Qt Creator 3.1.1 on Ubuntu 14.10 (the version installed when you install Ubuntu SDK - the two seem to be the same application). I'm running the default Unity 7 desktop.
When I create a new "Qt Widgets Application", I can add menu items to mainwindow.ui via the design interface. They appear in the Unity menu bar (appmenu) when I run the application from Qt Creator.
However, when I create a new "Qt Quick Application" and add menu items to main.qml, they do not appear in the Ubuntu menu bar. A new project starts with the following default menu item:
menuBar: MenuBar {
Menu {
title: qsTr("File")
MenuItem {
text: qsTr("Exit")
onTriggered: Qt.quit();
}
}
}
When I run the project the following error message is recorded:
appmenu-qt: handleReparent 136 The given QWindow has no QMenuBar assigned
Am I missing a dependency or something like that? Or is this a bug?