forked from CMon/QHumble
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (22 loc) · 745 Bytes
/
Copy pathmain.cpp
File metadata and controls
31 lines (22 loc) · 745 Bytes
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
31
#include <humblebundleapi.h>
#include "settings.h"
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QtWebView>
#ifdef Q_OS_ANDROID
#include <QtSvg> //Because deployment sometimes just forgets to include this lib otherwise
#endif
int main(int argc, char *argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QtWebView::initialize();
Settings settings;
HumbleBundleAPI hbApi(&app);
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("HumbleApi", &hbApi);
engine.rootContext()->setContextProperty("Settings", &settings);
engine.load(QUrl(QStringLiteral("qrc:///qml/main.qml")));
return app.exec();
}