-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.1
-
None
-
Windows 10, Windows 11
Processor: 12th Gen Intel(R) Core(TM) i5-1235U 1.30 GHz
Problem:
Mnemonics are not displayed after 'Alt' key press in basic Qt widgets. They appear when you put mouse over them, and never disappear. I saw some other different mnemonics bugs for version Qt 4.x and 5.x, and some problems still occur in newest Qt Creator 17.0 and Qt 6.9.1 (MSVC 2022, x86_64) version.
How to reproduce it:
- Create basic window application with 3 buttons, where each of them have assign mnemonic.
- Put mouse somewhere on frame and press any mnemonic shortcut
- Underscore sign should appear under each mnemonic letter to inform user about available shortcuts, but nothing such happen.
- Even if you use previous define shortcut e.g. 'Alt' + 'O' for Open, mnemonic appear, but then never disappear.
Hints and tips:
Take a look on my minimal reproducible example, which I attached to this ticket. When you uncomment function repaint() in MainWindow::keyPressEvent, you should solve the first error, but the same approach in MainWindow::keyReleaseEvent doen't hide the mnemonics on QPushButtons. Alt modifiers look and behave fine, so probably, state is not correctly propagate to widgets in QWindow.