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 in menuitem is removed in QtQuick2, equivalent way?
Qt 6.11 is out! See what's new in the release blog

shortcut in menuitem is removed in QtQuick2, equivalent way?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 324 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.
  • M Offline
    M Offline
    maxiaokang
    wrote on last edited by maxiaokang
    #1

    hi, experts:
    in qtquick1, following code can act exactly what I want:
    MenuItem {
    shortcut: "Ctrl+O"
    text: qsTr("Open Project")
    }

    0_1547975522737_0ee436f0-f787-45d6-a165-a7ead38b7b72-image.png

    but in qtquick2, no shortcut property provided. if using action:
    MenuItem {
    action: copyAction
    }
    Action {
    id: copyAction
    text: qsTr("Copy")
    shortcut: "Ctrl+C"
    }

    0_1547975695311_6f65a471-080e-44d2-8ed2-c8240b5556ab-image.png
    Although the function works but no "Ctrl + C" showed.
    Anyone knows the equivalent way? I don't want the answer like:
    "set text to "Copy (spaces.....) Ctrl + C"", it's too stupid.

    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