##// END OF EJS Templates
Improve QML Weather example layout...
Titta Heikkala -
r2761:c19e8d5c88d9
parent child
Show More
@@ -32,8 +32,8 Rectangle {
32 32 id: chartView
33 33 title: "Weather forecast"
34 34 //![1]
35 height: parent.height / 4 * 3
35 36 anchors.top: parent.top
36 anchors.bottom: weatherImageRow.top
37 37 anchors.left: parent.left
38 38 anchors.right: parent.right
39 39 legend.alignment: Qt.AlignTop
@@ -126,12 +126,12 Rectangle {
126 126
127 127 Row {
128 128 id: weatherImageRow
129 anchors.top: chartView.bottom
130 anchors.topMargin: 5
129 131 anchors.bottom: poweredByText.top
130 anchors.bottomMargin: 10
131 anchors.left: parent.left
132 anchors.leftMargin: 25
133 anchors.right: parent.right
134 anchors.rightMargin: 25
132 anchors.bottomMargin: 5
133 anchors.horizontalCenter: parent.horizontalCenter
134 height: parent.height - chartView.height - anchors.topMargin
135 135
136 136 ListModel {
137 137 id: weatherImageModel
@@ -142,7 +142,7 Rectangle {
142 142 model: weatherImageModel
143 143 delegate: Image {
144 144 source: imageSource
145 width: weatherImageRow.width / weatherImageModel.count
145 width: weatherImageRow.height
146 146 height: width
147 147 fillMode: Image.PreserveAspectCrop
148 148 }
@@ -152,9 +152,10 Rectangle {
152 152 Text {
153 153 id: poweredByText
154 154 anchors.bottom: parent.bottom
155 anchors.bottomMargin: 10
155 anchors.bottomMargin: 5
156 156 anchors.left: parent.left
157 157 anchors.leftMargin: 25
158 height: parent.height / 25
158 159 text: "Powered by World Weather Online"
159 160 }
160 161
General Comments 0
You need to be logged in to leave comments. Login now