Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0 Beta
-
17650467302819e1fd333f0682445d50fc52eb68
Description
The attached example works on Windows and Mac, but not Linux.
On Windows and Mac, you can press/drag/release the 0 into the green DropArea followed by doing the the same with the 1:
qml: onDropped text0
qml: onDropped text1
On Linux, after releasing the 0 in the green DropArea, the 0 moves with the mouse, and attempting to press/drag/release the 1 results in the 0 being dropped again:
qml: onDropped text0
qml: onDropped text0
The only ways to get out of this situation are to move the window via its title bar or click on empty white space. The issue has been present since Qt 5.2.x.
import QtQuick 2.0 ListView { width: 400; height: 400 model: 2 delegate: Text { text: index color: mouseArea.containsMouse ? "blue" : "black" font.pixelSize: 100 MouseArea { id: mouseArea hoverEnabled: true anchors.fill: parent drag.target: parent } Drag.active: mouseArea.drag.active Drag.dragType: Drag.Automatic Drag.mimeData: {'text/plain': 'text' + index} } Rectangle{//drop target width: 100; height: 100 color: 'green' anchors.bottom: parent.bottom opacity: dropArea.containsDrag? 0.1: 0.5 DropArea{ id: dropArea anchors.fill: parent onDropped: print('onDropped', drop.text) } } }
Attachments
Issue Links
- relates to
-
QTBUG-44976 Touch interaction with QtQuick Drag and Drop triggers crash
- Closed