This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/resources/main.qml

46 lines
1.2 KiB
QML
Raw Normal View History

2021-01-28 17:06:40 +08:00
import QtQuick 2.12
import QtQuick.Controls 2.5
ApplicationWindow {
visible: true
width: 960
height: 720
title: qsTr("Scroll")
ScrollView {
anchors.fill: parent
ListView {
width: parent.width
2021-03-19 19:17:11 +08:00
model: 4
2021-02-02 20:42:37 +08:00
delegate: Rectangle {
Column {
anchors.centerIn: parent
Text {
2021-03-01 18:59:09 +08:00
text: {
switch (index) {
case 0:
2021-03-19 19:17:11 +08:00
return "Counter.es5.js"
2021-03-01 18:59:09 +08:00
case 1:
2021-03-19 19:17:11 +08:00
return "Gobang.es5.js"
2021-03-17 19:38:22 +08:00
case 2:
2021-03-19 19:17:11 +08:00
return "SimpleDemo.es5.js"
case 3:
2021-03-01 18:59:09 +08:00
return "Snake.es5.js"
}
}
2021-02-02 20:42:37 +08:00
}
}
2021-01-28 17:06:40 +08:00
width: parent.width
2021-02-02 20:42:37 +08:00
height: 60
MouseArea {
anchors.fill: parent
2021-03-01 18:59:09 +08:00
onClicked: {
demoBridge.navigate(index)
}
2021-02-02 20:42:37 +08:00
}
2021-01-28 17:06:40 +08:00
}
}
}
}