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

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

    XMLWordPrintable

Details

    • Windows

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              luqiaochen Luqiao Chen
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes