From 271c790e020b82be88e421611bef169334ea0a4f Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Thu, 13 Jan 2011 10:49:13 +1000 Subject: Consistent Docs Example contradicted later docs. Fixed example. Task-number: QTBUG-16596 --- doc/src/snippets/declarative/codingconventions/photo.qml | 14 +++++++++++--- 1 file 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 -- cgit v0.12