-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
30 lines (23 loc) · 976 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickStyle>
#include "server/usermanager.h"
#include "server/servermanager.h"
#include "manager/filemanager.h"
#include "manager/serverroutemanager.h"
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
QQuickStyle::setStyle("Material");
qmlRegisterType<UserManager>("com.nubeucab.usermanager",1,0,"UserManager");
qmlRegisterType<ServerManager>("com.nubeucab.servermanager",1,0,"ServerManager");
qmlRegisterType<FileManager>("com.nubeucab.filemanager",1,0,"FileManager");
qmlRegisterType<ServerRouteManager>("com.nubeucab.srmanager",1,0,"ServerRouteManager");
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
engine.load(QUrl(QStringLiteral("qrc:/manager.qml")));
if (engine.rootObjects().isEmpty())
return -1;
return app.exec();
}