mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
da17b31be7
commit
82d1edc43c
@ -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
|
||||
|
@ -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();
|
||||
|
@ -11,6 +11,8 @@
|
||||
#include "Def.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#pragma comment(lib, "Dwmapi.lib")
|
||||
#pragma comment(lib, "User32.lib")
|
||||
#include <dwmapi.h>
|
||||
#include <Windows.h>
|
||||
#include <windowsx.h>
|
||||
|
@ -8,3 +8,8 @@ void FluentUI::registerTypes(const char *uri){
|
||||
void FluentUI::initializeEngine(QQmlEngine *engine, const char *uri){
|
||||
Fluent::getInstance()->initializeEngine(engine,uri);
|
||||
}
|
||||
|
||||
void FluentUI::initialize(QQmlEngine *engine){
|
||||
Fluent::getInstance()->registerTypes(URI_STR);
|
||||
Fluent::getInstance()->initializeEngine(engine,URI_STR);
|
||||
}
|
||||
|
@ -3,12 +3,13 @@
|
||||
|
||||
#include <QQmlEngine>
|
||||
|
||||
class FluentUI
|
||||
class Q_DECL_EXPORT FluentUI
|
||||
{
|
||||
|
||||
public:
|
||||
static void registerTypes(const char *uri) ;
|
||||
static void initializeEngine(QQmlEngine *engine, const char *uri);
|
||||
static void initialize(QQmlEngine *engine);
|
||||
};
|
||||
|
||||
#endif // FLUENTUI_H
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include "FluTheme.h"
|
||||
#include "FluApp.h"
|
||||
#ifdef Q_OS_WIN
|
||||
#pragma comment(lib, "Dwmapi.lib")
|
||||
#pragma comment(lib, "User32.lib")
|
||||
#include <Windows.h>
|
||||
#include <windowsx.h>
|
||||
#endif
|
||||
|
@ -5,6 +5,8 @@
|
||||
#include "FluTheme.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#pragma comment(lib, "Dwmapi.lib")
|
||||
#pragma comment(lib, "User32.lib")
|
||||
#include <dwmapi.h>
|
||||
#include <Windows.h>
|
||||
#include <windowsx.h>
|
||||
|
Loading…
Reference in New Issue
Block a user