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

Menmonics do not work with checkable QtQuickControls 2 MenuItem

    XMLWordPrintable

Details

    Description

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

      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
              enz Markus Enzenberger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes