Qt 6.11 is out! See what's new in the release
blog
How to add menu items under application menu on macOS?
-
I am trying to figure out how to add QAction's to the application menu, the one automatically created with the app's name, on macOS. The application automatically adds quit and preferences actions, but I want to add another one to show my in-app purchases widget.
Any idea how to do this?
Thanks!
-Patrick -
-
QAction::ApplicationSpecificRole This action should be put in the application menu with an application specific roleCreate the action with this menuRole:
action=menu->addAction(tr("Purchase...")); action->setMenuRole(QAction::ApplicationSpecificRole);@mpergand said in How to add menu items under application menu on macOS?:
QAction::ApplicationSpecificRole This action should be put in the application menu with an application specific roleCreate the action with this menuRole:
action=menu->addAction(tr("Purchase...")); action->setMenuRole(QAction::ApplicationSpecificRole);Perfect! Thank you....