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

DragHandler events are caught through popups

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.12.2, 6.5
    • Quick: Controls 2
    • None
    • macOS, Windows

      When dragging inside the popup, the DragHandler catches the events.
      But when clicking the button doesn't catch the event which seems normal.

      When you're in a popup, you shouldn't be able to drag the elements behind it.

      // code placeholder
      import QtQuick 2.12
      import QtQuick.Controls 2.12
      
      
      Item {
      
          Rectangle {
              height: 300
              width: 300
              color: "red"
      
              DragHandler {
              }
          }
      
          Button {
              text: "Open popup"
              onClicked: popupTest.open()
          }
      
          Button {
              anchors.centerIn: parent
              text: "Click"
              onClicked: console.log("click")
          }
      
          Popup {
              id: popupTest
              height: 200
              width: 200
              anchors.centerIn: parent
      
      // The rectangle can be moved here but the button can't be clicked
          }
      
      }
      

        For Gerrit Dashboard: QTBUG-87815
        # Subject Branch Project Status CR V

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            celine_115 Céline Sahuc
            Votes:
            14 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change