import QtQuick Window { id: root width: 640 height: 480 visible: true property QtObject comp: null function getImg(item) { comp = _cmp.createObject(root, { "source": item }); } function finishDrag() { comp.destroy(); comp = null; } ListView { anchors.fill: parent model: 4 delegate: MouseArea { id: delegate width: 640 height: 30 preventStealing: true acceptedButtons: Qt.LeftButton | Qt.MiddleButton | Qt.RightButton propagateComposedEvents: true Rectangle { anchors.fill: parent color: index % 2 === 0 ? "red" : "blue" } onPressed: { uniqueTimer.start(); console.log("Pressed!"); } onReleased: { if (uniqueTimer.running) uniqueTimer.stop(); root.finishDrag(); console.log("Released!"); } Timer { id: uniqueTimer interval: 250 onTriggered: { console.log("TRIGGERED!!!!"); root.getImg(delegate); } } } } Component { id: _cmp Item { property Item source Drag.dragType: Drag.None Drag.active: true Drag.supportedActions: Qt.CopyAction Component.onCompleted: { source.grabToImage(result => { Drag.imageSource = result.url; Drag.startDrag(); }); } } } }