From a3b1db8586cc10da12314cf21a0a377b50874703 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 21 May 2015 23:06:51 +0200 Subject: Fix writable ScrollBar/Indicator position & size properties The setters were already exposed as slots, but the properties should be writable to let apps implement eg. "infinite" scrolling using pure declarative bindings. Change-Id: I6c827803559b6d0f1bb97b90345874173ef107e4 Reviewed-by: J-P Nurmi --- src/controls/qquickscrollbar_p.h | 4 ++-- src/controls/qquickscrollindicator_p.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controls/qquickscrollbar_p.h b/src/controls/qquickscrollbar_p.h index df21d02b..9326ccd8 100644 --- a/src/controls/qquickscrollbar_p.h +++ b/src/controls/qquickscrollbar_p.h @@ -59,8 +59,8 @@ class QQuickScrollBarPrivate; class Q_QUICKCONTROLS_EXPORT QQuickScrollBar : public QQuickControl { Q_OBJECT - Q_PROPERTY(qreal size READ size NOTIFY sizeChanged FINAL) - Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL) Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) diff --git a/src/controls/qquickscrollindicator_p.h b/src/controls/qquickscrollindicator_p.h index c8c8e946..8ffc40a2 100644 --- a/src/controls/qquickscrollindicator_p.h +++ b/src/controls/qquickscrollindicator_p.h @@ -59,8 +59,8 @@ class QQuickScrollIndicatorPrivate; class Q_QUICKCONTROLS_EXPORT QQuickScrollIndicator : public QQuickControl { Q_OBJECT - Q_PROPERTY(qreal size READ size NOTIFY sizeChanged FINAL) - Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL) Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL) -- cgit v1.2.3