How to add menu items under application menu on macOS?
-
wrote on 21 Jul 2018, 00:26 last edited by
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 -
wrote on 21 Jul 2018, 00:58 last edited by
QAction::ApplicationSpecificRole This action should be put in the application menu with an application specific role
Create the action with this menuRole:
action=menu->addAction(tr("Purchase...")); action->setMenuRole(QAction::ApplicationSpecificRole);
-
QAction::ApplicationSpecificRole This action should be put in the application menu with an application specific role
Create the action with this menuRole:
action=menu->addAction(tr("Purchase...")); action->setMenuRole(QAction::ApplicationSpecificRole);
wrote on 21 Jul 2018, 01:47 last edited by@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 role
Create the action with this menuRole:
action=menu->addAction(tr("Purchase...")); action->setMenuRole(QAction::ApplicationSpecificRole);
Perfect! Thank you....
1/3