gridview

开始时使用flow布局,ajax请求的图片闪烁,后来改用gridview解决问题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
GridView {
cellWidth: 200
cellHeight: 150
model: contactModel
delegate: Column {
width: 200
height: 150
Image {
width: parent.width
horizontalAlignment: Image.AlignHCenter
sourceSize.height: 100
fillMode: Image.PreserveAspectFit
source: imgurl
Text {
anchors.bottomMargin: 30
width: parent.width
anchors.top: parent.bottom
horizontalAlignment: Text.AlignHCenter
font.pointSize: 10
text: name
}
}
}
}