Skip to content

Conversation

@yungyuc
Copy link
Member

@yungyuc yungyuc commented Jun 12, 2022

See https://doc.qt.io/qt-6/qmenubar.html#qmenubar-as-a-global-menu-bar . When it is macos, Qt search for "quit" or "exit" menu item and merge them with the corresponding item in the default menu. It does not need to be added by the app.

Also fix a typo for fileMenu.

See https://doc.qt.io/qt-6/qmenubar.html#qmenubar-as-a-global-menu-bar . When it is macos, Qt search for "quit" or "exit" menu item and merge them with the corresponding item in the default menu. It does not need to be added by the app.
@yungyuc yungyuc added the enhancement New feature or request label Jun 12, 2022
@yungyuc yungyuc self-assigned this Jun 12, 2022
Copy link
Member Author

@yungyuc yungyuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanagiragi Let me know if this looks good to you.


RMenuBar * menuBar = new RMenuBar();
RMenu * fileMmenu = new RMenu(QString("File"));
RMenu * fileMenu = new RMenu(QString("File"));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yanagiragi I think this is a typo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I believe this is a typo.

newMenu->addAction(newFileAction);
fileMenu->addMenu(newMenu);

#ifndef Q_OS_MACOS
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only build this when this is not in mac.

@yungyuc yungyuc merged commit 78b3285 into solvcon:master Jun 12, 2022
@yungyuc yungyuc deleted the 59-mac-no-exit branch June 12, 2022 13:53
@yungyuc
Copy link
Member Author

yungyuc commented Jun 12, 2022

ref #59

@yungyuc yungyuc mentioned this pull request Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants