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

85 lines
3.1 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-06-07 16:23:31 +08:00
model: 22
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-05-27 18:27:08 +08:00
return "ComponetDemo.js"
2021-03-01 18:59:09 +08:00
case 1:
2021-05-27 18:27:08 +08:00
return "Counter.js"
2021-03-17 19:38:22 +08:00
case 2:
2021-06-02 09:53:58 +08:00
return "DraggableDemo.js"
2021-03-19 19:17:11 +08:00
case 3:
2021-06-02 09:53:58 +08:00
return "EffectsDemo.js"
2021-04-16 10:06:15 +08:00
case 4:
2021-06-02 16:34:38 +08:00
return "FlexDemo.js"
2021-04-21 11:08:49 +08:00
case 5:
2021-06-02 16:34:38 +08:00
return "Gobang.js"
2021-04-22 14:54:31 +08:00
case 6:
2021-06-02 16:34:38 +08:00
return "ImageDemo.js"
2021-04-22 21:20:36 +08:00
case 7:
2021-06-02 16:34:38 +08:00
return "InputDemo.js"
2021-04-25 15:02:36 +08:00
case 8:
2021-06-02 16:34:38 +08:00
return "LayoutDemo.js"
2021-04-25 18:38:54 +08:00
case 9:
2021-06-02 16:34:38 +08:00
return "LayoutTestDemo.js"
2021-04-30 21:04:13 +08:00
case 10:
2021-06-02 16:34:38 +08:00
return "ModalDemo.js"
2021-05-06 10:01:56 +08:00
case 11:
2021-06-02 16:34:38 +08:00
return "ModularDemo.js"
2021-05-06 16:47:12 +08:00
case 12:
2021-06-02 16:34:38 +08:00
return "NetworkDemo.js"
2021-05-25 11:08:19 +08:00
case 13:
2021-06-07 16:23:31 +08:00
return "NotificationDemo.js"
2021-05-25 16:51:39 +08:00
case 14:
2021-06-07 16:23:31 +08:00
return "PopoverDemo.js"
2021-05-27 16:56:57 +08:00
case 15:
2021-06-07 16:23:31 +08:00
return "ScrollerDemo.js"
2021-05-27 18:27:08 +08:00
case 16:
2021-06-07 16:23:31 +08:00
return "SimpleDemo.js"
2021-05-27 18:42:33 +08:00
case 17:
2021-06-07 16:23:31 +08:00
return "SliderDemo.js"
2021-05-31 16:00:06 +08:00
case 18:
2021-06-07 16:23:31 +08:00
return "Snake.js"
2021-06-02 09:53:58 +08:00
case 19:
2021-06-07 16:23:31 +08:00
return "StorageDemo.js"
2021-06-02 16:34:38 +08:00
case 20:
2021-06-07 16:23:31 +08:00
return "SwitchDemo.js"
case 21:
2021-05-25 11:08:19 +08:00
return "TextDemo.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
}
}
}
}