qt6-bb10/tests/auto/widgets
Giuseppe D'Angelo 9944a12a0f QMenuBar: do not gain focus when releasing Alt before X in a Alt+X shortcut
It might happen that, when pressing Alt+X to trigger a shortcut for an
action in a menubar, that the user releases Alt first, followed by X. When
that happens, QMenuBar gains focus as if the user just pressed and
released Alt (to focus the menu bar). That's counterintuitive, frustating
and not what native Windows seems to do.

Fix this by resetting the "altPressed" state whenever a shortcut gets
triggered with the Alt key pressed.

(In the above discussion, X stands for any key).

Task-number: QTBUG-46812
Change-Id: If4b7a47842791894a3a32d09db5de229ed33773e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-10-15 16:25:57 +00:00
..
dialogs Merge remote-tracking branch 'origin/5.7' into 5.8 2016-10-06 20:12:27 +02:00
effects QtWidgets: Remove Windows CE. 2016-04-07 10:24:45 +00:00
gestures autotests: use QTest::createTouchDevice() 2016-06-10 13:07:17 +00:00
graphicsview Speed up compilation of tst_qgraphicsview_2.cpp 2016-10-03 14:59:56 +00:00
itemviews Merge remote-tracking branch 'origin/5.7' into 5.8 2016-10-11 07:40:32 +02:00
kernel Merge remote-tracking branch 'origin/5.7' into 5.8 2016-10-11 07:40:32 +02:00
styles Merge remote-tracking branch 'origin/5.7' into 5.8 2016-10-06 20:12:27 +02:00
util Merge remote-tracking branch 'origin/5.7' into 5.8 2016-10-06 20:12:27 +02:00
widgets QMenuBar: do not gain focus when releasing Alt before X in a Alt+X shortcut 2016-10-15 16:25:57 +00:00
widgets.pro