Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.2.0, 5.3.0 RC1
-
None
-
- reproducible on Windows 7
- not reproducible on OS X
Description
Clicking on the menu resets the activeFocusItem on Windows.
In the example below it is possible to dispatch the menu command with the Return key, but impossible with the mouse. Alternatively, the Gallery example can be used to reproduce the issue by trying to copy/paste selected text via the menu.
import QtQuick 2.2 import QtQuick.Controls 1.1 ApplicationWindow { id: window width: 200 height: 200 menuBar: MenuBar { Menu { title: "Some menu" MenuItem { id: menuItem text: "Some command" shortcut: "Return" enabled: window.activeFocusItem !== null onTriggered: window.activeFocusItem.executeMenuCmd() } } } Text { anchors.centerIn: parent focus: true text: "The menu item is " + (menuItem.enabled ? "enabled" : "disabled") function executeMenuCmd() { console.log("Menu command executed."); } } }
Attachments
Issue Links
- relates to
-
QTBUG-31120 TextInput: Selection is lost when parent window looses focus
- Closed