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?

share|improve this question
    
similar problem (no solution): forum.qt.io/topic/41504/… – d3vid Apr 4 '15 at 11:35
    
It's a known bug: bugs.launchpad.net/ubuntu/+source/appmenu-qt5/+bug/1323853 – mardy Oct 31 '16 at 9:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.