summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <j-p.nurmi@nokia.com>2012-07-05 11:54:39 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2012-07-05 14:23:10 +0200
commit8bc01ccf20b094880592b6c0e969afad74cc93ad (patch)
tree6d345b0213597161d1241ec06a4d303bd554bb38
parenta12ac2d82202caced9aad0d999f2056b2d925ac6 (diff)
downloadqtquickcontrols-8bc01ccf20b094880592b6c0e969afad74cc93ad.tar.gz
StyleItem: update when enabled/disabled
Change-Id: I45a2c4833d289748548100b6c543019c0c5d2e6b Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
-rw-r--r--examples/Gallery.qml3
-rw-r--r--src/qstyleitem.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/Gallery.qml b/examples/Gallery.qml
index 230e9d85..1f282387 100644
--- a/examples/Gallery.qml
+++ b/examples/Gallery.qml
@@ -374,6 +374,7 @@ Rectangle {
Tab {
id:mytab
title: "Itemviews"
+ enabled: enabledCheck.checked
ModelView {
anchors.fill: parent
anchors.margins: 6
@@ -381,6 +382,7 @@ Rectangle {
}
Tab {
title: "Range"
+ enabled: enabledCheck.checked
Row {
anchors.fill: parent
anchors.margins:16
@@ -461,6 +463,7 @@ Rectangle {
}
Tab {
title: "Sidebar"
+ enabled: enabledCheck.checked
Panel {
anchors.fill:parent
diff --git a/src/qstyleitem.cpp b/src/qstyleitem.cpp
index 2e022b9b..f9344cb9 100644
--- a/src/qstyleitem.cpp
+++ b/src/qstyleitem.cpp
@@ -90,6 +90,7 @@ QStyleItem::QStyleItem(QQuickPaintedItem *parent)
setSmooth(false);
//setCacheMode(QGraphicsItem::DeviceCoordinateCache);
+ connect(this, SIGNAL(enabledChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(infoChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(onChanged()), this, SLOT(updateItem()));
connect(this, SIGNAL(selectedChanged()), this, SLOT(updateItem()));