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

51 lines
1.4 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
2021-04-09 16:39:43 +08:00
width: 405
2021-01-28 17:06:40 +08:00
height: 720
title: qsTr("Scroll")
ScrollView {
anchors.fill: parent
2021-04-16 19:31:00 +08:00
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
2021-01-28 17:06:40 +08:00
ListView {
width: parent.width
2021-04-16 10:06:15 +08:00
model: 5
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-04-02 20:47:15 +08:00
return "Counter.js"
2021-03-01 18:59:09 +08:00
case 1:
2021-04-02 20:47:15 +08:00
return "Gobang.js"
2021-03-17 19:38:22 +08:00
case 2:
2021-04-16 10:06:15 +08:00
return "LayoutDemo.js"
2021-03-19 19:17:11 +08:00
case 3:
2021-04-16 10:06:15 +08:00
return "SimpleDemo.js"
case 4:
2021-04-02 20:47:15 +08:00
return "Snake.js"
2021-03-01 18:59:09 +08:00
}
}
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
}
}
}
}