aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickrangeslider_p.h
diff options
context:
space:
mode:
authorYulong Bai <yulong.bai@qt.io>2018-03-14 15:06:17 +0100
committerYulong Bai <yulong.bai@qt.io>2018-03-14 15:36:56 +0000
commit365059017722b32a3fe9ae7dec38d29944d6704c (patch)
tree1318668d854425b0bdc4f408974e108df0719161 /src/quicktemplates2/qquickrangeslider_p.h
parent12030ce62ef8fa0451679d19fc419ee0fa02bb6a (diff)
QQuickRangeSlider: add touchDragThreshold property
Add touchDragThreshold property for configuring the threshold to initiate a 'drag', i.e. touch move, of the handle of the slider. The mouse 'drag' won't be affected by the property. This property may be also used to configure the drag events stealing priorities of nested draggable items in the future. [ChangeLog][RangeSlider] Added touchDragThreshold property for configuring the threshold to initiate the touch 'drag' of the handle of the slider. The mouse 'drag' won't be affected by the property. Task-number: QTBUG-62784 Change-Id: I5555deb827de9d1dc7be00970fba15001105e419 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickrangeslider_p.h')
-rw-r--r--src/quicktemplates2/qquickrangeslider_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickrangeslider_p.h b/src/quicktemplates2/qquickrangeslider_p.h
index 45de6bbb..ae761ed0 100644
--- a/src/quicktemplates2/qquickrangeslider_p.h
+++ b/src/quicktemplates2/qquickrangeslider_p.h
@@ -70,6 +70,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSlider : public QQuickControl
Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
// 2.3 (Qt 5.10)
Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
+ // 2.5 (Qt 5.12)
+ Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION 5)
public:
explicit QQuickRangeSlider(QQuickItem *parent = nullptr);
@@ -109,6 +111,11 @@ public:
bool isHorizontal() const;
bool isVertical() const;
+ // 2.5 (Qt 5.12)
+ qreal touchDragThreshold() const;
+ void setTouchDragThreshold(qreal touchDragThreshold);
+ void resetTouchDragThreshold();
+
Q_SIGNALS:
void fromChanged();
void toChanged();
@@ -117,6 +124,8 @@ Q_SIGNALS:
void orientationChanged();
// 2.2 (Qt 5.9)
Q_REVISION(2) void liveChanged();
+ // 2.5 (Qt 5.12)
+ Q_REVISION(5) void touchDragThresholdChanged();
protected:
void focusInEvent(QFocusEvent *event) override;