Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.1, 5.15.2, 6.0.0
-
Windows 10 19042.685
-
-
acf2ed0c5f (qt/qtdeclarative/dev) acf2ed0c5f (qt/tqtc-qtdeclarative/dev) cd556bfef0 (qt/qtdeclarative/6.4) 235d683489 (qt/qtdeclarative/6.3) 235d683489 (qt/tqtc-qtdeclarative/6.3) cd556bfef0 (qt/tqtc-qtdeclarative/6.4)
Description
When Qt labs Platform MenuItem is used, the shortcut is triggered in both enabled/disabled states. This is causing incorrect behaviour for apps, which are using labs menus.
A minimal project with a bug attached.
import QtQuick 2.15 import QtQuick.Controls 2.15 import Qt.labs.platform 1.1 as Platform ApplicationWindow { width: 640 height: 480 visible: true title: qsTr("Hello World") Action { // enabled: false shortcut: "Ctrl+C" onTriggered: console.log("firing is expected") } Platform.Menu { Platform.MenuItem { enabled: false shortcut: "Ctrl+C" text: "test" onTriggered: console.log("why this fires?") } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-100121 Сannot disable shortcut for MenuItem from Qt.labs.platform
- Closed