aoloe/cpp-libui-qtlike

libui: invert the link between the quit action and the related menu entry

Closed this issue · 2 comments

aoloe commented

if i define

menuItem = uiMenuAppendQuitItem(menu);

i get a menu item that will automatically call uiOnShouldQuit() which should then be defined.

i would preferable to create the quit menu as a normal menu entry and further marking it something special.

aoloe commented

from the qt documentation:

http://doc.qt.io/qt-5/osx-issues.html

Each QAction has a menuRole property which controls the special placement of application menu items; however by default the menuRole is TextHeuristicRole which mean the menu items will be auto-detected by their text.

I would not go for an heuristic.

aoloe commented

I could solve this by using MenuActions (as in Qt): 9bbaae2