summaryrefslogtreecommitdiff
path: root/src/controls/Private/qquickcontrolsettings_p.h
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-03-10 15:42:35 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-18 09:38:44 +0100
commit354ff5e7733703ba6304ccf3241ab35b3e235cf1 (patch)
tree0fe683ffa1af4d946cfd83bd83dd65c4f9f2389b /src/controls/Private/qquickcontrolsettings_p.h
parent6aba49f84a17bad51f83968a03e5e9a58de726c6 (diff)
downloadqtquickcontrols-354ff5e7733703ba6304ccf3241ab35b3e235cf1.tar.gz
Slider: don't prevent stealing until drag threshold is exceeded
If a Slider is placed in a Flickable (or ListView, etc.), preventStealing means that you cannot flick the flickable by dragging over the Slider. It's better to postpone setting that until we detect whether the user is really attempting to drag the slider, because we don't want to rule out use cases such as vertical sliders in a horizontal ListView or vice-versa, so that you drag in one direction to move the slider and in another direction to flick. Platform drag threshold is exposed in Settings (from QStyleHints). (reverts/refines c9665f3e2d1eb12f1cc5a569c20f5d569fafde7f) Change-Id: I82feda6028f6effa5b26ad575a1933e48e971453 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src/controls/Private/qquickcontrolsettings_p.h')
-rw-r--r--src/controls/Private/qquickcontrolsettings_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/Private/qquickcontrolsettings_p.h b/src/controls/Private/qquickcontrolsettings_p.h
index 2b36e662..0687e209 100644
--- a/src/controls/Private/qquickcontrolsettings_p.h
+++ b/src/controls/Private/qquickcontrolsettings_p.h
@@ -56,6 +56,7 @@ class QQuickControlSettings : public QObject
Q_PROPERTY(QString styleName READ styleName WRITE setStyleName NOTIFY styleNameChanged)
Q_PROPERTY(QString stylePath READ stylePath WRITE setStylePath NOTIFY stylePathChanged)
Q_PROPERTY(qreal dpiScaleFactor READ dpiScaleFactor CONSTANT)
+ Q_PROPERTY(qreal dragThreshold READ dragThreshold CONSTANT)
Q_PROPERTY(bool hasTouchScreen READ hasTouchScreen CONSTANT)
public:
@@ -70,6 +71,7 @@ public:
void setStylePath(const QString &path);
qreal dpiScaleFactor() const;
+ qreal dragThreshold() const;
bool hasTouchScreen() const;