main
朱子楚\zhuzi 2023-04-16 02:28:58 +08:00
parent 6db8c4d4ac
commit 88008e16be
5 changed files with 25 additions and 7 deletions

View File

@ -7,7 +7,7 @@ AppInfo::AppInfo(QObject *parent)
: QObject{parent}
{
version("1.2.4");
changeLang("En");
lang(new En());
}
void AppInfo::changeLang(const QString& locale){

View File

@ -16,6 +16,7 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationName("FluentUI");
QQuickStyle::setStyle("Basic");
QGuiApplication app(argc, argv);
app.setQuitOnLastWindowClosed(false);
QQmlApplicationEngine engine;
qmlRegisterType<ChatController>("Controller",1,0,"ChatController");
AppInfo* appInfo = new AppInfo();

View File

@ -2,14 +2,16 @@
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import "qrc:///global/"
import Qt.labs.platform
import FluentUI
import "qrc:///global/"
FluWindow {
id:rootwindow
id:window
width: 1000
height: 640
title: "FluentUI"
closeDestory:false
minimumWidth: 520
minimumHeight: 460
@ -21,6 +23,18 @@ FluWindow {
darkText: lang.dark_mode
}
SystemTrayIcon {
visible: true
icon.source: "qrc:/res/image/favicon.ico"
onActivated: {
window.show()
window.raise()
window.requestActivate()
}
}
FluNavigationView{
id:nav_view
anchors.fill: parent

View File

@ -67,7 +67,6 @@ Rectangle{
height: root.height
spacing: 0
RowLayout{
Layout.alignment: Qt.AlignVCenter
Layout.rightMargin: 5

View File

@ -6,7 +6,6 @@ import FluentUI
ApplicationWindow {
enum LaunchMode {
Standard,
SingleTask,
@ -14,6 +13,7 @@ ApplicationWindow {
}
default property alias content: container.data
property bool closeDestory: true
property int launchMode: FluWindow.Standard
property string route
property var argument:({})
@ -50,8 +50,12 @@ ApplicationWindow {
onClosing:
(event)=>{
//
if(closeDestory){
helper.destoryWindow()
}else{
visible = false
event.accepted = false
}
}
FluInfoBar{