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

Menmonics do not work with checkable QtQuickControls 2 MenuItem

XMLWordPrintable

      If a QtQuickControls 2 MenuItem has a mnemonic, using that mnemonic does not change its checked state. The bug can be reproduced with the following code. Triggering the menu item with the mouse changes the checked state. Triggering it by pressing Alt-O, Alt-I does not change the checked state.

       

      import QtQuick.Controls 2.2
      
      ApplicationWindow {
          property bool flag
      
          width: 400; height: 400
          visible: true
      
          Button {
              text: "&Open menu"
      
              onClicked: menu.open()
      
              Menu {
                  id: menu
      
                  MenuItem {
                      text: "&Item"
                      checkable: true
                      checked: flag
                      onTriggered: {
                          flag = checked
                          console.log("flag=", flag)
                      }
                  }
              }
          }
      }
      

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            enz Markus Enzenberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes