Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.3
-
None
-
I'm using Qt 5.12.3 on macOS 10.14.4.
Description
I have a QML application with two menu item:
- File/Open... trigger open file modal dialog
- Control/Up just log something on the output console. This item has the up arrow keyboard shortcut association.
Strangely, the shortcut is still active when the open file dialog is display. This make impossible the use of the up arrow to select a given file for example since the shortcut is bind to another action.
In a regular Qt widget application, the menu shortcut is not handled when a modal dialog is on screen.
import QtQuick 2.12 import QtQuick.Window 2.12 import Qt.labs.platform 1.1 Window { visible: true width: 640 height: 480 title: "Hello World" FileDialog { id: fileDialog } MenuBar { Menu { title: "File" MenuItem { text: "Open" shortcut: StandardKey.Open onTriggered: fileDialog.open() } } Menu { title: "Control" MenuItem { text: "Up" shortcut: "Up" onTriggered: console.log("up!") } } } }