Details
-
Suggestion
-
Resolution: Out of scope
-
P2: Important
-
None
-
None
-
None
Description
UI elements that show a viewport onto a larger area have traditionally used scrollbars to enable moving around. With touch-enabled screens and other means of interacting with the UI (e.g. gestures on touch surfaces), kinetic scrolling and flick lists have emerged as the most intuitive way to interact. Qt needs to support these interaction mechanisms. This is mainly focused on QScrollView, but could also be useful in other scenarios, such as moving (or, throwing) an item on a graphicsscene around on a slippery surface.
Use cases
- scroll a one-dimensional list by dragging, and "throwing" the list contents - where scrolling speed decellerates until it stops
- when the end of a list is reached, scrolling overshoots, reverses direction and eases to zero stopping at the last item
- scroll a QGraphicsView scene that visualizes e.g. a set of "fullscreen" images, and scrolling left and right is the same as going forward and backward
- scroll a QGraphcisView scene that visualizes e.g. a zoomed in image, and scrolling left/right/up/down pans the image
- grab a graphics item (e.g. a picture) on a scene, and "throw" it in a direction. The item continues to move with momentum created after the user removes the finger, decelerating until it stops or reaches the scene edge
- this use-case could probably be better served with box2d or a similar physics library
- Unify kinetic scrolling behavior in Maemo5, QML, Plasma, etc
Existing Work
- The Qt port to Maemo5 has a QAbstractKineticScroller component
- QML has a flickable element
- Ariya created a Flick Charm
- The animation framework has easing functionality for deceleration
- Jacek wrote support in his (internal) dev/research/minibrowser example
Preconditions
- A good cross-platform solution should work on all platforms, e.g. with Mac OS X's trackpad to enable gesture for kinetic scrolling
- The API must be useful for QWidget, QGraphicsView-based, and QGLWidget components that require scrolling a viewport
Testability and verification
- Unit tests for decelleration, traction, edge-bounce, etc
- UI tests using the class in QScrollArea including QWebView, QAbstractItemView, QDeclarativeView, QGLView
Attachments
Issue Links
- replaces
-
QTBUG-8476 Integrate QAbstractKineticScroller to Qt
- Closed
-
QTBUG-36030 Support abstract scroll areas without scrollbars
- Reported
- resulted from
-
QTBUG-8476 Integrate QAbstractKineticScroller to Qt
- Closed