diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-07-14 01:51:22 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-07-26 07:05:33 (GMT) |
commit | 3f0bae81dc23ecec747907cb5525ed383867801a (patch) | |
tree | 054ca46d0f0604ff644d46412ed0f221218542b9 /doc/src/snippets | |
parent | 6ff23f2b2d96e852ed1fff0ecef0e8ee28ec82e7 (diff) | |
download | Qt-3f0bae81dc23ecec747907cb5525ed383867801a.zip Qt-3f0bae81dc23ecec747907cb5525ed383867801a.tar.gz Qt-3f0bae81dc23ecec747907cb5525ed383867801a.tar.bz2 |
improvements to docs and examples
(cherry picked from commit 07ebc9161263c04dc072b9fc2a922b9665cbe7be)
Diffstat (limited to 'doc/src/snippets')
-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 } } } |