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/example/app/main.qml

102 lines
3.7 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-06-08 10:25:36 +08:00
title: qsTr("Doric Demo")
2021-06-08 11:43:34 +08:00
Rectangle {
2021-06-08 10:25:36 +08:00
anchors.fill: parent
2021-01-28 17:06:40 +08:00
2021-06-08 11:43:34 +08:00
ScrollView {
id: entry
2021-06-08 10:25:36 +08:00
2021-06-08 11:43:34 +08:00
anchors.fill: parent
2021-01-28 17:06:40 +08:00
2021-06-08 11:43:34 +08:00
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ScrollBar.vertical.policy: ScrollBar.AlwaysOff
2021-04-16 19:31:00 +08:00
2021-06-08 11:43:34 +08:00
ListView {
width: parent.width
model: 23
delegate: Rectangle {
Column {
anchors.centerIn: parent
Text {
text: {
switch (index) {
case 0:
return "ComponetDemo.js"
case 1:
return "Counter.js"
case 2:
return "DraggableDemo.js"
case 3:
return "EffectsDemo.js"
case 4:
return "FlexDemo.js"
case 5:
return "Gobang.js"
case 6:
return "ImageDemo.js"
case 7:
return "InputDemo.js"
case 8:
return "LayoutDemo.js"
case 9:
return "LayoutTestDemo.js"
case 10:
return "ModalDemo.js"
case 11:
return "ModularDemo.js"
case 12:
return "NavigatorDemo.js"
case 13:
return "NetworkDemo.js"
case 14:
return "NotificationDemo.js"
case 15:
return "PopoverDemo.js"
case 16:
return "ScrollerDemo.js"
case 17:
return "SimpleDemo.js"
case 18:
return "SliderDemo.js"
case 19:
return "Snake.js"
case 20:
return "StorageDemo.js"
case 21:
return "SwitchDemo.js"
case 22:
return "TextDemo.js"
}
2021-03-01 18:59:09 +08:00
}
}
2021-02-02 20:42:37 +08:00
}
2021-06-08 11:43:34 +08:00
width: parent.width
height: 60
MouseArea {
anchors.fill: parent
onClicked: {
demoBridge.navigate(index)
}
2021-03-01 18:59:09 +08:00
}
2021-02-02 20:42:37 +08:00
}
2021-01-28 17:06:40 +08:00
}
}
2021-06-08 11:43:34 +08:00
onChildrenChanged: {
stack.push(this.children[this.children.length - 1])
}
}
StackView {
id: stack
anchors.fill: parent
2021-01-28 17:06:40 +08:00
}
}