diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-02-25 00:38:43 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-02-25 00:38:43 (GMT) |
commit | d654f87319408e3d9754fa5a8ad376c3eaef4489 (patch) | |
tree | 7276a6edf146fb9d1426dfd39714a6b2fbc3c4cf /tests/auto/declarative/qdeclarativestates/data | |
parent | fcfb08e40264c3417da91f4e187758d85f190a4f (diff) | |
download | Qt-d654f87319408e3d9754fa5a8ad376c3eaef4489.zip Qt-d654f87319408e3d9754fa5a8ad376c3eaef4489.tar.gz Qt-d654f87319408e3d9754fa5a8ad376c3eaef4489.tar.bz2 |
Automatically connect to signals "onFooChanged" if property is "foo".
This follows on from a2a8cea2835ef24104fe784b6ce0f508cc5637c0 to make
it work for PropertyChanges and QDeclarativeMetaProperty as well.
Task-number: QT-2783
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates/data')
-rw-r--r-- | tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml new file mode 100644 index 0000000..a373cfc --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/data/basicChanges4.qml @@ -0,0 +1,19 @@ +import Qt.test 1.0 +import Qt 4.6 + +MyRectangle { + id: rect + width: 100; height: 100 + color: "red" + + states: State { + name: "aBlueDay" + PropertyChanges { + target: rect + onPropertyWithNotifyChanged: { rect.color = "blue"; } + } + } + + Component.onCompleted: rect.state = "aBlueDay" +} + |