[Interest] Dragging across the path
Alexander Ivash
elderorb at gmail.com
Thu Jan 18 12:24:13 CET 2018
Hi,
What is the best way to implement it?
At the moment I have at least these two options:
1. Use normal QML mechanism for dragging (MouseArea's drag) but on x/y
changes of draggable item do Qt.callLater to adjust x/y manually.
2. Implement dragging manually using MouseArea and PathInterpolator
The first approach, besides a lot of manual calculations has
fundamental flaw - x/y are adjusted after being initially set, so
dragging will never be perfectly smooth.
The second approach doesn't use standard mechanism of dragging at all.
Is there better way which I don't see at the moment? Shouldn't
something like 'mouse pre-filter' or 'dragging constraints' become
part of the QML dragging mechanism in future to help solve such a use
cases?
To add a bit more context think about 'swype'-keyboard with snapping
to the predefined paths..
More information about the Interest
mailing list