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

QtQuickControls 2 Menu highlights disabled item on click

XMLWordPrintable

    • 763b51d494b708790acc3c3f797313f29d09976b (qt/qtquickcontrols2/5.12)

      If an open QtQuickControls 2 Menu is clicked on with the mouse, its first MenuItem gets highlighted even if it is disabled.

      To reproduce the bug, run the following example on a desktop environment (where Menu.cascade is true by default). Click on Menu, hover the mouse over Submenu (which opens the submenu) and then click on Submenu. Item1 gets highlighted even if it is disabled.
       

      import QtQuick.Controls 2.3
      
      ApplicationWindow {
          width: 400; height: 400
          visible: true
      
          header: MenuBar {
              Menu {
                  title: "Menu"
      
                  Menu {
                      title: "Submenu"
      
                      MenuItem { text: "Item1"; enabled: false }
                      MenuItem { text: "Item2" }
                  }
              }
          }
      }
      

        1. menu.gif
          62 kB
          Mitch Curtis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mitch_curtis Mitch Curtis
            enz Markus Enzenberger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes