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

Presses and releases leak through modal Menu

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.9.0 Beta 3
    • 5.9
    • Quick: Controls 2
    • None
    • cf67bb976e082105994ff00a2616129833edb857

    Description

      I noticed this in my auto test: https://github.com/mitchcurtis/slate/blob/master/tests/tst_app.cpp#L1281

      The code worked with Qt 5.8, and fails in 5.9.

      import QtQuick 2.7
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          id: window
          width: 400
          height: 400
          color: "#ffffff"
          visible: true
      
          MouseArea {
              id: mouseArea
              anchors.fill: parent
              hoverEnabled: true
              acceptedButtons: Qt.LeftButton | Qt.RightButton
      
              onPressed: print("pressed")
      
              onReleased: {
                  print("released")
                  if (mouse.button === Qt.RightButton && !contextMenu.visible) {
                      contextMenu.open();
                  }
              }
      
              Menu {
                  id: contextMenu
                  objectName: "tilesetContextMenu"
                  parent: window.contentItem
                  modal: true
                  dim: false
      
                  MenuItem {
                      id: duplicateMenuItem
                      objectName: "duplicateTileMenuButton"
                      text: qsTr("Duplicate")
                  }
      
                  MenuItem {
                      objectName: "rotateTileLeftMenuButton"
                      text: qsTr("Rotate 90° Left")
                  }
      
                  MenuItem {
                      objectName: "rotateTileRightMenuButton"
                      text: qsTr("Rotate 90° Right")
                  }
              }
          }
      }
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: