import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Layouts 1.1
Window {
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Rectangle {
width: 360;
height: 300;
color: "#EEEEEE";
ListView {
id: listView;
anchors.fill: parent;
Component {
id: phoneDelegate;
Item {
id: wrapper;
width: parent.width;
height: 30;
MouseArea {
anchors.fill: parent;
onClicked: wrapper.ListView.view.currentIndex = index;
}
RowLayout {
anchors.left: parent.left;
anchors.verticalCenter: parent.verticalCenter;
spacing: 8;
Text {
qml ListView 语法
最新推荐文章于 2022-08-07 23:10:14 发布