Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.3, 5.15.10, 6.3.1
-
None
-
Microsoft Surface 5 and other touch-enabled devices
-
-
31e7790102 (qt/qtbase/dev) 31e7790102 (qt/tqtc-qtbase/dev) f35ad8f32f (qt/tqtc-qtbase/6.2) 97c95f606f (qt/qtbase/6.4) 97c95f606f (qt/tqtc-qtbase/6.4) 97c95f606f (qt/tqtc-qtbase/6.4.1) 97c95f606f (qt/tqtc-qtbase/tqtc/qtinsight-6.4)
Description
When performing drags in QML with dragType set to Automatic, Qt uses the WinAPI function DoDragDrop() to perform drag and drop operations on Windows (in QWindowsDrag::drag()). The documentation for that function indicates that Qt is using it the wrong way for pen and touch input: "DoDragDrop does not support invoking drag and drop support when you handle touch or pen input.", see the remarks here. I found this out by setting up remote debugging for the test case and hitting pause when the app was hanging.
For us, this results in touch drag operations which hang until the application gets mouse input or the user presses the ESC key. In our real application we also have situations where users can start a lot of pen drag operations in a short amount of time (they can rearrange a set of items in a small space), which also freezes DnD, I assume that we get somewhat lucky with DoDragDrop() there and it mostly works, except for freezing after performing a lot of these short drag operations.
In the example you can reproduce this by trying to drag the blue rectangle: with mouse everything woks as expected and the full drag & drop cycle is performed. With touch, no indicator is drawn at the mouse cursor and no pixmap preview is shown, additionally it almost always freezes on the first drag. The video shows that the application freezes as soon as the drag starts (when the output prints "Qt::LeftButton") and that I can get it to unfreeze by moving the mouse.
Attachments
Issue Links
- relates to
-
QTBUG-77414 Drag and Drop with mimeData does not work properly on the touch screen
- Reported
-
QTBUG-44976 Touch interaction with QtQuick Drag and Drop triggers crash
- Closed
-
QTBUG-76310 Dragging (QDrag) triggered by touch event requires an additional press to move drag target
- Closed
-
QTBUG-57577 Windows: Drag and drop through touch sometimes gets stuck with -platform windows:nomousefromtouch
- Closed
- resulted in
-
QTBUG-111149 Reg->6.4.2: Windows: Qt Designer freezes when dragging actions in QMenu
- Closed