Flickable with draggable Items inside
-
I have a vertical Flickable, filled with Items that i want to drag out of the Flickable in horizontal direction.
I also want to be able to flick when pressing on the items and NOT moving horizontally.
Imagine something like e.g. a list of buildings that i can flick through, and then i can drag one out and place it on the map.
Therefore i can't use the drag.target property of the MouseArea, because it prevents the Flickable from stealing the mouse event (but i need the Flickable to steal it in case i move the mouse vertically to flick instead of dragging). So i use onPositionChanged to match the position of the Item i drag to the position of the mouse manually.All this works so far, now on to my real problem:
It is really hard to drag the Item out of the Flickable, because the mouse (and i imagine it will be even harder using your finger on a mobile device) must move exactly horizontally. A small divergence in vertical direction leads to flicking and calls the canceled signal of the MouseArea, which i use to reset the Item if the user wants to flick instead of dragging.
So my question is: Is there a possibility to create something like an horizontal offset before the Flickable steals the mouse event. Or any other ideas how to make it easier to drag the Item out of the Flickable.Any ideas are highly welcome!
Cheers .
Alex