Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.4.1, 5.10.0
-
-
9899c29daf3f867f02f4b5f920d50e877ec3f3c3
Description
When I programatically create a shortcut using setShortcut(QKeySequence("alt + X")) creates a shortcut that contains ⌥ symbol (on mac keyboards it can be found next to command key) + X, which however can't be triggered using alt + X (I have normal keyboard connected to Mac).
In Qt4 this works fine.
This happens with parent-less menubar only. The attached example can be used to reproduce the problem. It's menu has three items with shortcuts: cmd+T, alt+T and alt+shift+T. Shortcuts trigger statusbar message - except now only cmd+T triggers it. If you want to compare the behavior to a menubar with parent, remove the define from mainwindow.cpp, line 6. In that case all the shortcuts trigger the statusbar message.
One workaround is to add the alt+ actions to the mainwindow too. Then the shortcut doesn't trigger the menu action though and therefore f.ex. the menu doesn't flash, but at least they work.
Attachments
Issue Links
- relates to
-
QTBUG-114595 Alt modifier doesn't work in shortcuts on MacOS with parent-less menubar
-
- Open
-