[Interest] QML and mac system menu
mitch.curtis at qt.io
Wed Sep 11 10:07:05 CEST 2019
> -----Original Message-----
> From: Andreas Pakulat <apaku at gmx.de>
> Sent: Tuesday, 10 September 2019 10:20 PM
> To: Mitch Curtis <mitch.curtis at qt.io>
> Cc: Alexander Dyagilev <alervdvcw at gmail.com>; interestqt-project.org
> <interest at qt-project.org>
> Subject: Re: [Interest] QML and mac system menu
> On Tue, Sep 10, 2019 at 3:26 PM Mitch Curtis <mitch.curtis at qt.io
> <mailto:mitch.curtis at qt.io> > wrote:
> > -----Original Message-----
> > From: Interest <interest-bounces at qt-project.org <mailto:interest-
> bounces at qt-project.org> > On Behalf Of Alexander
> > Dyagilev
> > Sent: Tuesday, 10 September 2019 3:11 PM
> > To: interestqt-project.org <http://interestqt-project.org>
> <interest at qt-project.org <mailto:interest at qt-project.org> >
> > 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: .
> > 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
Yeah, so... you still don't have control over it as long as it's named a certain way, which was my point.
If you think Qt is doing something wrong, then please report it as a bug. I assume we're following design guidelines for macOS.
More information about the Interest