Files
qyouvideo/Main.qml

98 lines
2.5 KiB
QML
Raw Normal View History

2025-10-11 02:30:58 +02:00
import QtQuick 6.8
import QtQuick.Controls 6.8
import QtQuick.Controls.Basic 6.8
2025-10-11 02:30:58 +02:00
import QtQuick.Layouts 6.8
2025-10-11 02:30:58 +02:00
import QYRComponents 1.0
ApplicationWindow {
id: root
2025-10-11 17:55:56 +02:00
width: 1280
height: 800
2025-10-18 21:40:02 +02:00
title: qsTr("QYouVideo")
ColumnLayout {
anchors.fill: parent
2025-10-11 17:55:56 +02:00
Rectangle {
Layout.fillWidth: true
height: 43
color: Colors.surface0
2025-10-14 13:36:21 +02:00
RowLayout {
anchors.fill: parent
anchors.margins: 3
2025-10-14 13:36:21 +02:00
Label {
Layout.leftMargin: 5
2025-10-18 21:40:02 +02:00
text: "QYouVideo"
heading: "h1"
2025-10-14 13:36:21 +02:00
}
Item {
Layout.fillWidth: true
}
TabBar {
id: tabbar
spacing: 10
background: Item{}
TabButton {
2025-10-18 21:40:02 +02:00
text: qsTr("Videos")
outlined: true
implicitWidth: 80
}
TabButton {
2025-10-18 21:40:02 +02:00
text: qsTr("About")
outlined: true
implicitWidth: 80
}
TabButton {
2025-10-18 21:40:02 +02:00
text: qsTr("Upload")
}
}
2025-10-11 17:55:56 +02:00
}
}
SwipeView {
Layout.fillWidth: true
Layout.fillHeight: true
Layout.margins: 20
2025-10-11 17:55:56 +02:00
interactive: false
currentIndex: tabbar.currentIndex
Loader {
// active: tabbar.currentIndex == 0
active: true
asynchronous: true
visible: status == Loader.Ready
2025-10-18 21:40:02 +02:00
source: "ViewVideoList.qml"
}
Loader {
// active: tabbar.currentIndex == 1
active: true
asynchronous: true
visible: status == Loader.Ready
2025-10-18 21:40:02 +02:00
source: "ViewAbout.qml"
}
Loader {
// active: tabbar.currentIndex == 2
active: true
asynchronous: true
visible: status == Loader.Ready
2025-10-18 21:40:02 +02:00
sourceComponent: Label {
heading: "h1"
text: "No idea if I'll ever implement this so don't worry >w<"
font.bold: true
}
}
Component.onCompleted: contentItem.highlightMoveDuration = 160;
2025-10-11 02:30:58 +02:00
}
}
}