Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Why is this action with shortcut "Ctrl+Alt+Minus" not triggered?



  • Why is this action with shortcut "Ctrl+Alt+Minus" not triggered?

    Action {
        id: zoomOutY
        text: qsTr("Zoom Out Y")
        shortcut: "Ctrl+Alt+Minus"
        onTriggered: console.log("Zoom out")
    }
    

    This similar action is correctly triggered:

    Action {
        id: zoomOutX
        text: qsTr("Zoom Out X")
        shortcut: StandardKey.ZoomOut
        onTriggered: console.log("Zoom out X")
    }
    

    This on keys press event is also correctly triggered if I put it on some item. Note that the same keys are used as in the Action that is not triggered:

    Keys.onPressed: {
        if ((event.modifiers & Qt.AltModifier) && (event.modifiers & Qt.ControlModifier) && event.key === Qt.Key_Minus) {
            console.log("Zoom out y")
        }
    }

Log in to reply