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

QML Sub menu doesn't disappear

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 6.2.1
    • Quick: Controls 2
    • None
    • Android

    Description

      I select Menu 3 , Menu 3.2 then Menu 1

      Menu 3 is still visible

       

      Here is the Qml code to reproduce:

      import QtQuick
       import QtQuick.Controls
      
      Window {
          id: window
          visible: true
          width: 1280; height: 720
      
      
          Menu {
              id: contextMenu
              title: "MainMenu"
              cascade: true
              Menu {
                  title: "Menu 1"
                  MenuItem { text: "Option 1";}
                  MenuItem { text: "Option 2";}
                  MenuItem { text: "Option 3";}
              }
              MenuItem { text: "Option 1";}
              MenuItem { text: "Option 2";}
              MenuItem { text: "Option 3";}
              Menu {
                  title: "Menu 2"
                  Menu {
                      title: "Menu 2.1"
                      MenuItem { text: "Option 1";}
                      MenuItem { text: "Option 2";}
                      MenuItem { text: "Option 3";}
                  }Menu {
                      title: "Menu 2.2"
                      MenuItem { text: "Option 1";}
                      MenuItem { text: "Option 2";}
                      MenuItem { text: "Option 3";}
                  }
              }
              Menu {
                  title: "Menu 3"
                  Menu {
                      title: "Menu 3.1"
                      MenuItem { text: "Option 1";}
                      MenuItem { text: "Option 2";}
                      MenuItem { text: "Option 3";}
                  }Menu {
                      title: "Menu 3.2"
                      MenuItem { text: "Option 1";}
                      MenuItem { text: "Option 2";}
                      MenuItem { text: "Option 3";}
                  }
              }
          }
          MouseArea {
              anchors.fill: parent
              acceptedButtons: Qt.LeftButton | Qt.RightButton
              onClicked: {
      
                      contextMenu.popup()
              }
              onPressAndHold: {
                  if (mouse.source === Qt.MouseEventNotSynthesized)
                      contextMenu.popup()
              }
      
          }
      
      }
      

      Attachments

        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
            remy67 remy rouvin
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes