summaryrefslogtreecommitdiffstats
path: root/examples/declarative/gridview
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-04-13 04:48:47 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-04-13 04:49:32 (GMT)
commit8149e7aa743c178f13452e7292ea41dccc8aec46 (patch)
tree83ed6171fc9541b328c0d223fbb55793a19fbad6 /examples/declarative/gridview
parent35d0792025d515e81b2bf208aa1fd7dce28096e6 (diff)
downloadQt-8149e7aa743c178f13452e7292ea41dccc8aec46.zip
Qt-8149e7aa743c178f13452e7292ea41dccc8aec46.tar.gz
Qt-8149e7aa743c178f13452e7292ea41dccc8aec46.tar.bz2
Fix code style in examples
Diffstat (limited to 'examples/declarative/gridview')
-rw-r--r--examples/declarative/gridview/gridview-example.qml19
1 files changed, 15 insertions, 4 deletions
diff --git a/examples/declarative/gridview/gridview-example.qml b/examples/declarative/gridview/gridview-example.qml
index fd5f430..a5f41fb 100644
--- a/examples/declarative/gridview/gridview-example.qml
+++ b/examples/declarative/gridview/gridview-example.qml
@@ -1,7 +1,8 @@
import Qt 4.7
Rectangle {
- width: 300; height: 400; color: "white"
+ width: 300; height: 400
+ color: "white"
ListModel {
id: appModel
@@ -16,10 +17,19 @@ Rectangle {
Component {
id: appDelegate
+
Item {
width: 100; height: 100
- Image { id: myIcon; y: 20; anchors.horizontalCenter: parent.horizontalCenter; source: icon }
- Text { anchors.top: myIcon.bottom; anchors.horizontalCenter: parent.horizontalCenter; text: name }
+
+ Image {
+ id: myIcon
+ y: 20; anchors.horizontalCenter: parent.horizontalCenter
+ source: icon
+ }
+ Text {
+ anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
+ text: name
+ }
}
}
@@ -31,8 +41,9 @@ Rectangle {
GridView {
anchors.fill: parent
cellWidth: 100; cellHeight: 100
- model: appModel; delegate: appDelegate
highlight: appHighlight
focus: true
+ model: appModel
+ delegate: appDelegate
}
}