Reputation: 887
I have a C++ application that uses Qt/QML for its GUI. I'd like to add an entry to the menu with the app's name in the OSX menu bar using QML. I already managed to do this in C++ with QMenu, QActions etc. and it works fine. But in this case it would be sufficient and cleaner to do this in QML.
So far all I could find was using MenuBar, Menu and MenuItem - but this only adds new menus to the menu bar. Adding to the existing app name menu does not seem to work.
Any ideas?
Upvotes: 1
Views: 157
Reputation: 7160
This will be doable with the new experimental Qt.labs.platform
module available in Qt 5.8 (yet to be released) : Qt.labs.platform's MenuBar
.
Currently Qt 5.8 is only available in Alpha, this means you'd have to compile it yourself from source to use it and it isn't considered stable.
EDIT : As DenverCoder21 mentionned, it seems that this doesn't make it possible to alter the app menu, only add other menus.
Upvotes: 1