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

Shortcut of MenuItem QML Type from Qt Labs Platform is partially broken.

XMLWordPrintable

    • Windows

      A minimal reproducer:

      import QtQuick
      import QtQuick.Controls
      import Qt.labs.platform as Labs
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("MenuTest")
      
          Labs.MenuBar {
              Labs.Menu {
                  title: qsTr("&Navigation")
      
                  Labs.MenuItem {
                      text: qsTr("Previous Frame")
                      shortcut: StandardKey.Back
                      onTriggered: {
                          console.log("previous frame");
                      }
                  }
              }
          }
      }
      

      Problems of MenuItem from Labs module:
      1. With QGuiApplication module, shortcut that contains Alt key does not work. Not triggered whatsoever. StandardKey.Back (Alt+Left) is an example.
      2. With QApplication, shortcut works but menu itself is totally invisible.

      The expected behavior is Alt key works for shortcut unconditionally.

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

            vhilshei Volker Hilsheimer
            luqiaochen Luqiao Chen
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes