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

QtQuick : Mouse handling broken in during external drag.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.2.1, 5.3.1, 5.3.2
    • None
    • qmlscene main.qml

    Description

      I have following piece of code and i am trying to do external drag.

      I am not getting mouse release event when when i drag the green rectangle and move the mouse out side the window and then release the mouse.

      Steps:
      1- drag the green rectangle
      2- while dragging move the mouse outside the window
      3- now release the mouse
      4- release event does not get delivered to MouseArea

      Release event comes to MouseArea only when i move the mouse back in window.

      This issue is also reproducible when i do startDrag manually.

      main.qml
      import QtQuick 2.2
      
      Rectangle {
          width: 200
          height: 200
          color: "red"
          MouseArea {
              id: mouseArea
              anchors.fill: parent
              drag.target: draggable
              onPressed: { console.log("mousearea::onPressed") }
              onReleased: { console.log("mousearea::onReleased") }
          }
          Rectangle {
              id: draggable
              width: 100
              height: 100
              color: "green"
              Drag.active: mouseArea.drag.active
              Drag.keys : ["text/plain"]
              Drag.mimeData: { "text/plain": "hello" }
              Drag.dragType: Drag.Automatic
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              tvete Paul Olav Tvete
              manishsharma Manish Sharma
              Votes:
              9 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes