FluentUI/example/qml-Qt6/App.qml

51 lines
1.6 KiB
QML
Raw Normal View History

2023-08-24 15:50:37 +08:00
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import FluentUI
2023-10-17 15:17:05 +08:00
Item {
2023-08-24 15:50:37 +08:00
id: app
2023-09-17 20:36:33 +08:00
Connections{
target: FluTheme
function onDarkModeChanged(){
SettingsHelper.saveDarkMode(FluTheme.darkMode)
}
}
2023-10-15 17:24:33 +08:00
Connections{
target: FluApp
function onVsyncChanged(){
SettingsHelper.saveVsync(FluApp.vsync)
}
2023-11-23 19:58:54 +08:00
function onUseSystemAppBarChanged(){
SettingsHelper.saveUseSystemAppBar(FluApp.useSystemAppBar)
}
2023-10-15 17:24:33 +08:00
}
2023-08-24 15:50:37 +08:00
Component.onCompleted: {
2023-12-07 23:01:09 +08:00
FluNetwork.openLog = false
2023-11-29 21:35:06 +08:00
FluNetwork.setInterceptor(function(param){
param.addHeader("Token","000000000000000000000")
})
2023-08-24 15:50:37 +08:00
FluApp.init(app)
2023-11-23 19:58:54 +08:00
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
2023-10-15 17:24:33 +08:00
FluApp.vsync = SettingsHelper.getVsync()
2023-09-17 20:36:33 +08:00
FluTheme.darkMode = SettingsHelper.getDarkMode()
2023-08-24 15:50:37 +08:00
FluTheme.enableAnimation = true
FluApp.routes = {
"/":"qrc:/example/qml/window/MainWindow.qml",
"/about":"qrc:/example/qml/window/AboutWindow.qml",
"/login":"qrc:/example/qml/window/LoginWindow.qml",
"/hotload":"qrc:/example/qml/window/HotloadWindow.qml",
"/singleTaskWindow":"qrc:/example/qml/window/SingleTaskWindow.qml",
"/standardWindow":"qrc:/example/qml/window/StandardWindow.qml",
2023-08-26 17:20:30 +08:00
"/singleInstanceWindow":"qrc:/example/qml/window/SingleInstanceWindow.qml",
"/pageWindow":"qrc:/example/qml/window/PageWindow.qml"
2023-08-24 15:50:37 +08:00
}
FluApp.initialRoute = "/"
FluApp.run()
}
}