summaryrefslogtreecommitdiff
path: root/doc/snippets/qmlapp/codingconventions
diff options
context:
space:
mode:
Diffstat (limited to 'doc/snippets/qmlapp/codingconventions')
-rw-r--r--doc/snippets/qmlapp/codingconventions/photo.qml12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/snippets/qmlapp/codingconventions/photo.qml b/doc/snippets/qmlapp/codingconventions/photo.qml
index a944cca0..57bbd709 100644
--- a/doc/snippets/qmlapp/codingconventions/photo.qml
+++ b/doc/snippets/qmlapp/codingconventions/photo.qml
@@ -65,7 +65,9 @@ Rectangle {
}
color: "gray" // object properties
- x: 20; y: 20; height: 150 // try to group related properties together
+ x: 20 // try to group related properties together
+ y: 20
+ height: 150
width: { // large bindings
if (photoImage.width > 200) {
photoImage.width;
@@ -78,7 +80,10 @@ Rectangle {
id: border
anchors.centerIn: parent; color: "white"
- Image { id: photoImage; anchors.centerIn: parent }
+ Image {
+ id: photoImage
+ anchors.centerIn: parent
+ }
}
states: State { // states
@@ -87,7 +92,8 @@ Rectangle {
}
transitions: Transition { // transitions
- from: ""; to: "selected"
+ from: ""
+ to: "selected"
ColorAnimation { target: border; duration: 200 }
}
}