summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2011-01-13 00:49:13 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2011-01-13 00:49:13 (GMT)
commit271c790e020b82be88e421611bef169334ea0a4f (patch)
treefa5b72542fb5746304bd85c9edc0b8f5cc2e5eae /doc/src
parent0808eb1222c70341b0deee3164089c8b6a03ef06 (diff)
downloadQt-271c790e020b82be88e421611bef169334ea0a4f.zip
Qt-271c790e020b82be88e421611bef169334ea0a4f.tar.gz
Qt-271c790e020b82be88e421611bef169334ea0a4f.tar.bz2
Consistent Docs
Example contradicted later docs. Fixed example. Task-number: QTBUG-16596
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/snippets/declarative/codingconventions/photo.qml14
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