Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8.0
-
None
Description
During drag, before dropping, the cursor shape does not change when proposed action changes.
Using this slightly modified snippet I am logging proposed actions change when holding or releasing Ctrl and/or Shift keys, however the cursor shape does not change. Once dragging started, the cursor shape remains locked.
import QtQuick Item { width: 200 height: 200 Rectangle { anchors.centerIn: parent width: text.implicitWidth + 20 height: text.implicitHeight + 10 color: "green" radius: 5 Drag.active: dragHandler.active Drag.dragType: Drag.Automatic Drag.supportedActions: Qt.CopyAction | Qt.MoveAction Drag.mimeData: { "text/plain": "Copied text" } Text { id: text anchors.centerIn: parent text: "Drag me" } DragHandler { id: dragHandler onActiveChanged: if (active) { parent.grabToImage(function (result) { parent.Drag.imageSource = result.url; parent.Drag.active = true; }); } else { parent.Drag.active = false; } } } DropArea { id: dropArea anchors.fill: parent onDropped: { console.log("dropped", drop.proposedAction == Qt.MoveAction ? "move" : "copy"); } onPositionChanged: { console.log("dagging", drag.proposedAction == Qt.MoveAction ? "move" : "copy"); } } }