diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-12-03 11:18:52 +0100 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-12-13 10:50:12 +0000 |
commit | 1b79a40466ccb1ba52b596c69f3af607a1148b07 (patch) | |
tree | 3124bae0aeba43029ffa12af21a4c07423109bda | |
parent | cf5da3e8e235331c4929f236a1966bbd0cf28256 (diff) |
Doc: velocity properties must be set to -1 when setting duration
This is an important detail that was left out, causing confusion when
a user tries to set e.g. highlightMoveDuration without setting
highlightMoveVelocity to -1.
Change-Id: Ida4042626fcc20105267a5d2a0babcb91eed1516
Reviewed-by: Michael Brasser <michael.brasser@live.com>
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 908801ce1c..62cbfcef2b 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -2456,7 +2456,18 @@ QString QQuickListView::currentSection() const The default value for the duration properties is -1, i.e. the highlight will take as much time as necessary to move at the set speed. - These properties have the same characteristics as a SmoothedAnimation. + These properties have the same characteristics as a SmoothedAnimation: + if both the velocity and duration are set, the animation will use + whichever gives the shorter duration. + + To set only one property, the other can be set to \c -1. For example, + if you only want to animate the duration and not velocity, use the + following code: + + \code + highlightMoveDuration: 1000 + highlightMoveVelocity: -1 + \endcode \sa highlightFollowsCurrentItem */ |