diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-05-16 14:52:32 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-07-12 20:25:04 +0000 |
commit | 1bf1a1c460fcfb1555026cbb1127cfc6daee7ca0 (patch) | |
tree | 7135a86b43680bbbbef24b327f8811c69a78b027 /tests/manual/touch/flicktext.qml | |
parent | 8092c5617092195d7df02775f423f5e420eb764f (diff) |
Add Flickable.synchronousDrag property
When it is set true, Flickable begins dragging by making the content
jump to the position where it would have been if there was no drag
threshold: that is, the content moves exactly in sync with the mouse
cursor or finger (as long as it's not hitting the bounds).
[ChangeLog][QtQuick][Flickable] Added a synchronousDrag property that
makes the content jump to the position it would have had if there was
no drag threshold, as soon as dragging begins.
Task-number: QTBUG-62902
Change-Id: I5f3b530956363172167896b0f19aec4a41bf82b3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/manual/touch/flicktext.qml')
-rw-r--r-- | tests/manual/touch/flicktext.qml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/manual/touch/flicktext.qml b/tests/manual/touch/flicktext.qml index 6e8dcfded5..9e84261687 100644 --- a/tests/manual/touch/flicktext.qml +++ b/tests/manual/touch/flicktext.qml @@ -48,7 +48,7 @@ ** ****************************************************************************/ -import QtQuick 2.4 +import QtQuick 2.12 import "qrc:/quick/shared/" as Examples Rectangle { @@ -67,6 +67,7 @@ Rectangle { contentWidth: text.implicitWidth contentHeight: text.implicitHeight pixelAligned: pxAlignCB.checked + synchronousDrag: syncDragCB.checked Text { id: text text: "foo bar" @@ -366,10 +367,15 @@ Rectangle { } Column { + spacing: 2 Examples.CheckBox { id: pxAlignCB text: "pixel aligned" } + Examples.CheckBox { + id: syncDragCB + text: "synchronous drag" + } Text { text: "content X " + flick.contentX.toFixed(2) + " Y " + flick.contentY.toFixed(2) } |