diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-14 01:51:22 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-07-14 01:51:22 (GMT) |
commit | 07ebc9161263c04dc072b9fc2a922b9665cbe7be (patch) | |
tree | bbf983b8968f4a0df6ac089a7ff716ec4a66efc6 /doc/src/snippets/declarative | |
parent | 237bc693a527f9cb2b6bbe7c518018cbf56b0eb6 (diff) | |
download | Qt-07ebc9161263c04dc072b9fc2a922b9665cbe7be.zip Qt-07ebc9161263c04dc072b9fc2a922b9665cbe7be.tar.gz Qt-07ebc9161263c04dc072b9fc2a922b9665cbe7be.tar.bz2 |
improvements to docs and examples
Diffstat (limited to 'doc/src/snippets/declarative')
-rw-r--r-- | doc/src/snippets/declarative/mousearea.qml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/src/snippets/declarative/mousearea.qml b/doc/src/snippets/declarative/mousearea.qml index 8e7c737..fb6cba0 100644 --- a/doc/src/snippets/declarative/mousearea.qml +++ b/doc/src/snippets/declarative/mousearea.qml @@ -83,17 +83,18 @@ Rectangle { id: container width: 600; height: 200 - Image { - id: pic - source: "pics/qt.png" - opacity: (600.0 - pic.x) / 600 + Rectangle { + id: rect + width: 50; height: 50 + color: "red" + opacity: (600.0 - rect.x) / 600 MouseArea { anchors.fill: parent - drag.target: pic + drag.target: rect drag.axis: Drag.XAxis drag.minimumX: 0 - drag.maximumX: container.width - pic.width + drag.maximumX: container.width - rect.width } } } |