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

QtQuickControls 2 Menu does not close if Action becomes disabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.12.2
    • 5.11.1
    • Quick: Controls 2
    • None
    • ec8952cec9b44e7ab77c5450d8d6fb6579c21555

    Description

      If a QtQuickControls 2 Menu contains an Action that becomes disabled as a cosequence of being triggered, the menu does not close.

      To reproduce the bug, run the following example and click on Menu, then on Item. Item becomes disabled, but stays highlighted and the Menu does not close. The bug does not occur, if a MenuItem is used instead of the action.

      import QtQuick.Controls 2.3
      
      ApplicationWindow {
          visible: true
          width: 400; height: 400
          menuBar: MenuBar {
              Menu {
                  title: "Menu"
      
                  Action {
                      text: "Item"
                      onTriggered: enabled = false
                  }
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes