Details
-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
None
-
5.12.0
-
None
Description
The example works as expected on 5.11.3 but fails to work with 5.12.0.
Expected:
- Press mouse on green rectangle
- Dragged rectangle changes color to red (mouse pressed)
- Either drop on yellow rectangle or release mouse (cancel drag)
- Drag is finished/cancelled, rectangle green again (mouse released)
With 5.12 no mouse release event is delivered in either the cancel or drop situation.
Checked on macOS 11.14.1.
import QtQuick 2.11 import QtQuick.Window 2.11 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Rectangle { id: draggable width: 200 height: 200 color: mouse.pressed ? "red" : "green" Drag.active: mouse.drag.active Drag.supportedActions: Qt.MoveAction Drag.proposedAction: Qt.MoveAction Drag.mimeData: { "application/item" : true // accept only internal mime-type } Drag.dragType: Drag.Automatic } MouseArea { id: mouse anchors.fill: parent drag.target: draggable onReleased: console.log("RELEASED") } Rectangle { x: 300 y: 10 width: 100 height: 100 color: "yellow" DropArea { id: dropArea anchors.fill: parent keys: ["application/item"] // accept only special internal drag onDropped: { console.log("DROPPED"); drop.accept(Qt.MoveAction); } } } }
Attachments
Issue Links
- relates to
-
QTBUG-72417 Mac: Dragging an Item with Drag.dragType: Drag.Automatic does not send released signal on mouse up
- Closed