gridview

社会主义新天地 提交于 2019-11-29 00:22:46

开始时使用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
                            }
                        }

                    }
                }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!