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

59 lines
1.8 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-23 17:56:08 +08:00
width: 600
height: 800
2021-01-28 17:06:40 +08:00
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-25 15:02:36 +08:00
model: 9
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-22 21:20:36 +08:00
return "ImageDemo.js"
2021-03-19 19:17:11 +08:00
case 3:
2021-04-22 21:20:36 +08:00
return "LayoutDemo.js"
2021-04-16 10:06:15 +08:00
case 4:
2021-04-22 21:20:36 +08:00
return "ModalDemo.js"
2021-04-21 11:08:49 +08:00
case 5:
2021-04-25 15:02:36 +08:00
return "NetworkDemo.js"
2021-04-22 14:54:31 +08:00
case 6:
2021-04-25 15:02:36 +08:00
return "PopoverDemo.js"
2021-04-22 21:20:36 +08:00
case 7:
2021-04-25 15:02:36 +08:00
return "SimpleDemo.js"
case 8:
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
}
}
}
}