Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96350

QML: Shortcut: strange warning

    XMLWordPrintable

Details

    • Windows

    Description

      QML Shortcut component generates the following strange warning under Qt 6.2:

      qrc:/main.qml:11:5: QML Shortcut: Shortcut: Only binding to one of multiple key bindings associated with 9. Use 'sequences: [ <key> ]' to bind to all of them. 

      Code:

      import QtQuick 2.12
      import QtQuick.Window 2.12
      import QtQuick.Controls 2.12
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Shortcut {
              sequence: StandardKey.Paste
              onActivated: console.log("PASTE")
          }
      }
      
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-96350
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              alervd Alexander Dyagilev
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change