diff options
author | David Boddie <david.boddie@nokia.com> | 2011-01-26 16:22:13 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-01-26 16:22:13 (GMT) |
commit | 8533384ded9323a0b38490ed65793abd9a62d46f (patch) | |
tree | 6faac6d1c32bebb1df0294332033bc44dc0d8ae5 /doc/src/snippets/declarative | |
parent | 834c8617dc130126c0ce5213bda36b9f62717b1e (diff) | |
parent | 5498dcd7b10e147734a3414cab824b8b435aa3d9 (diff) | |
download | Qt-8533384ded9323a0b38490ed65793abd9a62d46f.zip Qt-8533384ded9323a0b38490ed65793abd9a62d46f.tar.gz Qt-8533384ded9323a0b38490ed65793abd9a62d46f.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Diffstat (limited to 'doc/src/snippets/declarative')
-rw-r--r-- | doc/src/snippets/declarative/codingconventions/photo.qml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/src/snippets/declarative/codingconventions/photo.qml b/doc/src/snippets/declarative/codingconventions/photo.qml index 61e7eb7..78c5068 100644 --- a/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/doc/src/snippets/declarative/codingconventions/photo.qml @@ -49,12 +49,20 @@ Rectangle { signal clicked // signal declarations - function doSomething(x) { // javascript functions + function doSomething(x) // javascript functions + { return x + photoImage.width } - x: 20; y: 20; width: 200; height: 150 // object properties - color: "gray" // try to group related properties together + color: "gray" // object properties + x: 20; y: 20; height: 150 // try to group related properties together + width: { // large bindings + if(photoImage.width > 200){ + photoImage.width; + }else{ + 200; + } + } Rectangle { // child objects id: border |