-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmain.cpp
34 lines (27 loc) · 1.02 KB
/
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
31
32
#include <QGuiApplication>
#include <QQuickView>
#include <QDebug>
#include "src/controller.h"
#include <sailfishapp.h>
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
app->setOrganizationName("harbour-smpc");
app->setApplicationName("harbour-smpc");
QString locale = QLocale::system().name();
QString translationFile = QString(":translations/harbour-smpc_") + locale;
QTranslator translator;
translator.load(translationFile);
app->installTranslator(&translator);
// QScopedPointer<QQuickView> view(SailfishApp::createView());
QQuickView *view = SailfishApp::createView();
view->engine()->addImportPath("/usr/share/harbour-smpc/qml/");
view->setSource(SailfishApp::pathTo("qml/main.qml"));
view->setDefaultAlphaBuffer(true);
foreach (QString path, view->engine()->importPathList()) {
qDebug() << path;
}
Controller *control = new Controller(view,0);
view->show();
return app->exec();
}