Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.0
-
None
-
528b720d8f25c851b5e73b4159c20d70a47aefc0
Description
When dragging an item using the Drag API in QtQuick, the mouse cursor position is off.
This is hard to describe in words, but let me try:
In QtWidget land, the drag behavior basically follows this principle (easy to verify by dragging some widgets in a QtDesigner form):
1) Mouse press and hold
2) Move cursor
3) Eventually Qt interprets mouse move as drag
4) Underlying item is immediately moved to the mouse position when a drag is registered
5) Underlying item is further moved in sync with the mouse cursor
In QtQuick, this is slightly different:
Basically, step (4) is missing here.
Because of this, the cursor is off when further dragging the item.
Attached the slightly modified example from http://qt-project.org/doc/qt-5/qml-qtquick-drag.html#details.
How to reproduce:
Drag the red rectangle about (50,50) pixels
What I'd expected as example output:
press: 5, 6
release: 5, 6
But what you get is something along:
press: 5, 6
release: 10, 17
Attachments
Issue Links
- resulted from
-
QTBUG-30188 Dragging an item with MouseArea is not smooth with a large drag threshold.
-
- Closed
-
For Gerrit Dashboard: QTBUG-38539 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
84898,5 | Introduce MouseArea.drag.smoothed | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |