Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.9.5, 5.10.1
-
Windows 10 (1709) 64bit
Qt 5.9.5 / 5.10.1
Description
When running following example on Windows 10:
in Qt 5.9.5:
Rectangle loses activeFocus after pressing Alt 2 times.
Rectangle loses activeFocus after second Alt-Tab switch app back and forth and pressing any key
In Qt 5.10.1:
No key event with Alt-modifier is received
These problems are not present if there's no menuBar property defined.
import QtQuick 2.9 import QtQuick.Window 2.2 import QtQuick.Controls 1.3 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") menuBar: MenuBar { Menu { title: "Edit" } } Rectangle { id: content anchors.fill: parent; focus: true onActiveFocusChanged: { console.log("activeFocus: " + activeFocus); } property int keyboardModifiers : 0 Keys.onPressed: { console.log( "pressed key: " + event.key ); keyboardModifiers = event.modifiers; } Keys.onReleased : { keyboardModifiers = event.modifiers; } function printModifiers( modifiers ) { switch( modifiers ) { case Qt.ShiftModifier: return "Shift"; case Qt.ControlModifier: return "Control"; case Qt.AltModifier: return "Alt"; case Qt.MetaModifier: return "Meta"; default: return "No modifier"; } } Text { text: content.printModifiers( content.keyboardModifiers ) anchors.centerIn: parent } } }
Attachments
Issue Links
- relates to
-
QTBUG-42793 MenuBar always steals keyboard focus when Alt or Esc key pressed
- Reported
-
QTBUG-55967 Controls 1: Native MenuItems on Windows are sized incorrectly
- Reported