Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
In QML, we have SwipeView and SwipeDelegate, which can handle common use cases for swiping.
However, there are instances where a more fine grained control is desired. Consider
A) an ebook reader, where swiping left and right should turn a page (and where turning a page can involve anything from an immediate transition to a complex shader based page turn animation)
B) a map viewer, where a swipe should move the view port (most likely depending on the swipe veloicity)
C) Any more advanced gesture navigation than possible with SwipeView
This can actually implemented with DragHandler, by (ab)using onActiveChanged and checking whether centroid.velocity and translation are over certain thresholds. However, that's rather imperative, and IMHO not obvious.
It would be nicer if there were a
signal swipe(double velocity, Direction direction)
on DragHandler or maybe a dedicated SwipeHandler. It would probably make sense to have properties to control minimum thresholds for swipes (as opposed to simple drags), and to only trigger the signal for certain directions; though we could probably set some (platform specific?) defaults.
Attachments
Issue Links
- depends on
-
QTBUG-92179 get PanNativeGesture working where possible, and/or add deltas to SwipeNativeGesture
- Closed
- relates to
-
QTBUG-98825 Try to remove QQuickVelocityCalculator
- Reported
-
QTBUG-92098 support touchpad gestures on Wayland (client)
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-92086 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
340931,4 | WIP DragHandler: react to SwipeNativeGesture | dev | qt/qtdeclarative | Status: NEW | -2 | 0 |