-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
29 lines (20 loc) · 747 Bytes
/
main.cpp
File metadata and controls
29 lines (20 loc) · 747 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
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include "src/Core.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
QScopedPointer<QApplication> app(createApplication(argc, argv));
QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());
viewer->setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
Core *core;
if( app->arguments().length() > 1 ) {
core = new Core(viewer->getView(), app->arguments().last());
} else {
core = new Core(viewer->getView());
}
viewer->getView()->setWindowTitle("Browser");
viewer->setMainQmlFile("qrc:/qmls/qml/HeliumReborn/main.qml");
core->start();
viewer->showExpanded();
return app->exec();
}