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

QML: Shortcut: strange warning

XMLWordPrintable

    • Windows
    • e657c7be9 (dev), c8184f4d1 (6.10)

      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")
          }
      }
      
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            fabiankosmale Fabian Kosmale
            alervd Alexander Dyagilev
            Votes:
            3 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes