diff options
Diffstat (limited to 'src/doc/src/snippets/declarative/codingconventions/photo.qml')
-rw-r--r-- | src/doc/src/snippets/declarative/codingconventions/photo.qml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/doc/src/snippets/declarative/codingconventions/photo.qml b/src/doc/src/snippets/declarative/codingconventions/photo.qml index 0e9e5d3b..e70b055e 100644 --- a/src/doc/src/snippets/declarative/codingconventions/photo.qml +++ b/src/doc/src/snippets/declarative/codingconventions/photo.qml @@ -50,7 +50,7 @@ Rectangle { signal clicked // signal declarations function doSomething(x) // javascript functions - { + { return x + photoImage.width } @@ -58,10 +58,10 @@ Rectangle { x: 20; y: 20; height: 150 // try to group related properties together width: { // large bindings if(photoImage.width > 200){ - photoImage.width; - }else{ - 200; - } + photoImage.width; + } else { + 200; + } } Rectangle { // child objects |