This commit is contained in:
zhuzichu
2023-04-22 19:25:10 +08:00
parent da17b31be7
commit 82d1edc43c
7 changed files with 24 additions and 1 deletions

View File

@ -52,3 +52,8 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
mac: {
QMAKE_INFO_PLIST = Info.plist
}
#### 如果你正在使用静态库,请将将下面的配置注释取消掉。
#DEFINES += STATICLIB
#INCLUDEPATH += $$OUT_PWD/../bin/FluentUI/
#LIBS += -L$$OUT_PWD/../bin/FluentUI/ -lFluentUI

View File

@ -8,6 +8,9 @@
#include "AppInfo.h"
#include "controller/ChatController.h"
#include "tool/IPC.h"
#if defined(STATICLIB)
#include <FluentUI.h>
#endif
int main(int argc, char *argv[])
{
@ -38,6 +41,9 @@ int main(int argc, char *argv[])
}
app.setQuitOnLastWindowClosed(false);
QQmlApplicationEngine engine;
#if defined(STATICLIB)
FluentUI::initialize(&engine);
#endif
qmlRegisterType<ChatController>("Controller",1,0,"ChatController");
QQmlContext * context = engine.rootContext();
Lang* lang = appInfo->lang();