aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-08-27 18:53:25 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-08-28 10:51:30 +0000
commit6c35631dd4a399144e473ffefba2716c7f3f1cca (patch)
treef7cb9c822662fc0e4064d8d71fb3b070d0ea6488
parent2812d380e5999733aaaf2ace2bdbd0702ce293dc (diff)
Native style: make StyleItem::control notifyable
Even though 'control' should only be set once and never change, the QML engine will complain if you have a binding to e.g control.pressed, since both 'control' and 'pressed' in theory can change. So add a NOTIFY section to silence the engine. Change-Id: I64b79b7fd163cbeb5de78504f3b58d915edc278b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/imports/nativestyle/items/qquickstyleitem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/nativestyle/items/qquickstyleitem.h b/src/imports/nativestyle/items/qquickstyleitem.h
index 37e9dc3d..ad315b96 100644
--- a/src/imports/nativestyle/items/qquickstyleitem.h
+++ b/src/imports/nativestyle/items/qquickstyleitem.h
@@ -154,7 +154,7 @@ class QQuickStyleItem : public QQuickItem
Q_OBJECT
// Input
- Q_PROPERTY(QQuickItem *control MEMBER m_control)
+ Q_PROPERTY(QQuickItem *control MEMBER m_control NOTIFY controlChanged)
Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth)
Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight)
Q_PROPERTY(bool useNinePatchImage MEMBER m_useNinePatchImage)
@@ -208,6 +208,7 @@ public:
void markImageDirty();
signals:
+ void controlChanged();
void contentPaddingChanged();
void layoutMarginsChanged();
void fontChanged();