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

42 lines
1.0 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-01 18:59:09 +08:00
model: 2
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:
return "SimpleDemo.es5.js"
case 1:
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
}
}
}
}