I am creating a desktop application and I was wondering how I would go about having the Qt Quick Controls menubar show up as a global menu on Ubuntu?
If I understood well (from this post) you can't inject QML code in Ubuntu's (Unity) global menu (read: UGM).
But if you really want to your menu appear as UGM then my nasty workaround would be to create two windows, one which will represent UGM (set it to be on top of all windows) and another actual application. QtDesktop component should help you. However, I wouldn't recommend you to do this way because you need to look on many things (like actions when window looses focus).
If you don't want to inject QML code in UGM, but just to make your own menu which will trigger functions in QML, then follow these instructions. And later connect C++ code to QML.
Also, try creating menu with QtDesktop component first, it might move menu automatically to UGM. (I am not using Ubuntu, so I can't check this for you)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With