[Interest] Qt Quick MenuBar in subsections of a window

Damian Ivanov damianatorrpm at gmail.com
Tue Feb 25 10:39:51 CET 2014

Hi Alex,

depends on how you define menubar..
You can make a few buttons next to each other and every button
triggers it's own menu like
Row {
Menu{id:1 ....................}
Menu{id:2  ....................}
Menu{id:3 ....................}
Button {id:1 onClicked: menu1.popup()}
Button {id:2 onClicked: menu2.popup()}
Button {id:3 onClicked: menu3.popup()}


2014-02-24 22:41 GMT+01:00 Alex Montgomery <apmontgomery at gmail.com>:
> Hello,
> It seems like the only way to show a MenuBar in Qt Quick is to create one
> and immediately set it as the menuBar property of an ApplicationWindow, but
> can the MenuBar stand alone? I'd like to create a window that has multiple
> sections each with its own MenuBar, but that doesn't seem possible. Am I
> missing something?
> Declaring a MenuBar as part of a visible item doesn't cause an error, but it
> doesn't show a valid menubar either. This has confused myself and others,
> e.g.:
> http://www.qtcentre.org/threads/56484-Qt-QML-MenuBar-and-Menus-not-showing
> If MenuBar can only be used at the top of an ApplicationWindow shouldn't
> that at least be documented?
> http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-menubar.html
> Regards,
> Alex
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

More information about the Interest mailing list