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 /src/quick/items/qquickflickable_p.h | |
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 'src/quick/items/qquickflickable_p.h')
-rw-r--r-- | src/quick/items/qquickflickable_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickflickable_p.h b/src/quick/items/qquickflickable_p.h index 939e3af698..45921c8b86 100644 --- a/src/quick/items/qquickflickable_p.h +++ b/src/quick/items/qquickflickable_p.h @@ -106,6 +106,7 @@ class Q_QUICK_PRIVATE_EXPORT QQuickFlickable : public QQuickItem Q_PROPERTY(QQuickFlickableVisibleArea *visibleArea READ visibleArea CONSTANT) Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged) + Q_PROPERTY(bool synchronousDrag READ synchronousDrag WRITE setSynchronousDrag NOTIFY synchronousDragChanged REVISION 12) Q_PROPERTY(qreal horizontalOvershoot READ horizontalOvershoot NOTIFY horizontalOvershootChanged REVISION 9) Q_PROPERTY(qreal verticalOvershoot READ verticalOvershoot NOTIFY verticalOvershootChanged REVISION 9) @@ -213,6 +214,9 @@ public: bool pixelAligned() const; void setPixelAligned(bool align); + bool synchronousDrag() const; + void setSynchronousDrag(bool v); + qreal horizontalOvershoot() const; qreal verticalOvershoot() const; @@ -259,6 +263,7 @@ Q_SIGNALS: void dragStarted(); void dragEnded(); void pixelAlignedChanged(); + Q_REVISION(12) void synchronousDragChanged(); Q_REVISION(9) void horizontalOvershootChanged(); Q_REVISION(9) void verticalOvershootChanged(); |