-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (21 loc) · 763 Bytes
/
main.cpp
File metadata and controls
26 lines (21 loc) · 763 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
#include <QtGui/QGuiApplication>
#include "ViewManagement.h"
#include "CoreApplication.h"
#include <QDebug>
#include <QtQml>
int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(new QGuiApplication(argc, argv));
QCoreApplication::setOrganizationName("Paul Lemire");
QCoreApplication::setApplicationName("Smooth Remote");
QScopedPointer<CoreApplication> coreApplication(CoreApplication::getInstance());
ViewManagement *viewManager = ViewManagement::getInstance();
viewManager->setSource(QUrl("qrc:/qml/main.qml"));
viewManager->getContext()->setContextProperty("core", coreApplication.data());
#ifdef Q_WS_ANDROID
viewManager->showFullScreen();
#else
viewManager->show();
#endif
return app->exec();
}