Details
-
Bug
-
Resolution: Out of scope
-
P4: Low
-
4.6.0
-
None
Description
On OS-X and possibly other platforms, the native menus (non-Qt) allow you to have a menu item that has sub-items but can still be activated directly. For example you might have a menu bar with Format -> Font -> [supersript, subscript, bold, italic], such that going to the sub menu changes one aspect of the font but clicking on font directly brings up a bigger set of options.
However if you set a menu on an action in Qt you can no longer activate it from within a menu. clicking on 'font' in a Qt built menu, even if Font is an action, will only ever open and select an item in the sub menu.
There doesn't appear to be anything in the doc about overriding this, and it appears that the code explicitly excludes the idea of activating an action with a sub-menu.
In Qt void QMenu::mouseReleaseEvent(QMouseEvent *e)
there is an if statement:
if (action->menu())
that if followed excludes activating the action (the activate is in the 'else' section of the same if statement)