gridview

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

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
                            }
                        }

                    }
                }
posted @ 2019-08-30 14:53  shenmi  阅读(124)  评论(0编辑  收藏  举报