Hi, On Tue, Sep 10, 2019 at 3:26 PM Mitch Curtis <[email protected]> wrote:
> > -----Original Message----- > > From: Interest <[email protected]> On Behalf Of Alexander > > Dyagilev > > Sent: Tuesday, 10 September 2019 3:11 PM > > To: interestqt-project.org <[email protected]> > > Subject: [Interest] QML and mac system menu > 2) Is there a way to add my custom menu items to the first menu element of > > my app system menu (which is bold). E.g. "untitled" in my case: . "Quit" > > menu goes there automatically despite it's in "File" menu really, > according to > > the QML code. > > > > In my experience the Quit menu item goes where it wants to. It seems to be > a feature of macOS. > I don't know for QtQuick Controls, but at least for QWidgets its not 'where it wants to', but 'where Qt decides to put it'. There's special logic in the native code for binding QMenu and it's items to macOS menu items that handles actions with the (translated) text 'Quit', 'About', and 'About Qt' and moves them to the applications' menu. So you can have a quit action in your file menu by not calling it 'Quit' (or 'Exit'). Maybe 'Terminate' would work. I suspect the same logic is being applied to menus created via QtQuick Controls. Andreas
_______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest
