Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Shortcut that starts from a StandardKey but requires an extra modifier?

Shortcut that starts from a StandardKey but requires an extra modifier?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 208 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pokemonsrqt
    wrote on last edited by pokemonsrqt
    #1

    The first two actions work nicely. But the last two action don't. I'm not completely sure why.

    Action {
        id: zoomInOnXAxis
        text: qsTr("Zoom In On X-Axis")
        shortcut: StandardKey.ZoomIn
        onTriggered: console.log("Zoom In On X-Axis")
    }
    
    Action {
        id: zoomOutOnXAxis
        text: qsTr("Zoom Out On X-Axis")
        shortcut: StandardKey.ZoomOut
        onTriggered: console.log("Zoom Out On X-Axis")
    }
    
    Action {
        id: zoomInOnYAxis
        text: qsTr("Zoom In On Y-Axis")
        shortcut: qsTr("Ctrl+Alt+Plus")
        onTriggered: console.log("Zoom In On Y-Axis")
    }
    
    Action {
        id: zoomOutOnYAxis
        text: qsTr("Zoom Out On Y-Axis")
        shortcut: qsTr("Ctrl+Alt+Minus")
        onTriggered: console.log("Zoom Out On Y-Axis")
    }
    

    How can I get them to work? Is it perhaps possible to define a shortcut that is something along the lines of StandardKey.ZoomIn+Alt?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved