Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How to use Drag.Automatic

$
0
0
Hi Guys, Just updated to 5.2 and eager to test external drag and drop but want to better understand Drag.Automatic. Right now I have this code sample: Item {         id: draggable         width   : 50;         height  : 50;           Drag.active: mouseArea.drag.active           Drag.mimeData: { "text/plain": "test" }         //Drag.dragType: Drag.Automatic           Rectangle {             anchors.fill: parent             color : "red"         }           MouseArea {             id: mouseArea             drag.target: draggable             anchors.fill: parent         }     } It works as expected, I can drag a red rectangle around. But if I un-comment Drag.dragType: Drag.Automatic now the rectangle does not move during the drag and will only change its position when I release the mouse. Do I need to do something else to make it move during the drag and not only when I drop? Thanks a lot!

Viewing all articles
Browse latest Browse all 4972

Trending Articles