Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.8.0
-
None
Description
I would expect a MouseArea's drag.target to remain in sync with the cursor on dragging however if there is some main thread jank then they will become out of sync.
Notice how in the below gif the cursor and the red target rectange are not in sync.
Obviously ideally there would never be any main thread jank but in my case I update a QItemSelectionModel selected index in the MouseArea's onPressed call and this causes some other QML components to be created hanging the main thread briefly.
I have not checked the code but I suspect the MouseArea start's applying the mouse cursor delta to the target item but if it applies the delta between the press event and the first drag event as well then it should remain in sync
See the attached example project for a code example.