You have to use an ApplicationWindow as your top-level item and assign your MenuBar to the menuBar property of it: http://doc.qt.io/qt-5/qml-qtquick-controls-applicationwindow.html#menuBar-prop
On Tue, Apr 14, 2015 at 10:05 AM, mark diener <rpzrpz...@gmail.com> wrote: > Hello: > > Tried using a MenuBar QML component with a Window component on OSX > yosemite, but > the Menubar does not appear at all. > > Anybody have a tip on menubar visibility or usage on OSX? (Any gotchas > in windows?) > > Thanks all, > > md > > > import QtQuick 2.4 > > import QtQuick.Window 2.2 > > import QtQuick.Controls 1.3 > > > import "main.js" as Gjs > > > Window { > > > id: mainwindow > > > visible: true > > > width: Screen.width > > height: Screen.height > > color: "black" > > title: "Mockup" > > > MenuBar > > { > > id: mainmenu > > Menu > > { > > title: qsTr("RpzMockup") > > MenuItem > > { > > text: qsTr("Exit") > > onTriggered: Qt.quit() ; > > } > > } > > } > > } > > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > >
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest