htzfun
htzfun

Reputation: 1448

How to add "About" action to app on OS X?

In almost every application on OS X, if you click on the name of application, one of the actions is "About". I understand how I can do this in QMenuBar, but seems like it is not a part of it.

The second question is how this will be shown on Windows?

I don't use QML - how to do this in code? Like this way:

QMenu *fileMenu = menuBar->addMenu("File");

QAction *newFile = new QAction("New", fileMenu);
QAction *openProjectAction = new QAction("Open project", fileMenu);

So how I add "About" action to group of actions of application? Screenshot addedGoogle Chrome about

Upvotes: 1

Views: 91

Answers (1)

kefir500
kefir500

Reputation: 4414

You can simply add your action as Help --> About.

  • On macOS the action will be automatically moved to the needed section, as on your screenshot.
  • On Windows this action will remain as is (in the Help section).

You may also want to take a look at the macOS QAction roles.

Upvotes: 2

Related Questions