-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmain.cpp
More file actions
26 lines (20 loc) · 724 Bytes
/
main.cpp
File metadata and controls
26 lines (20 loc) · 724 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 <QGuiApplication>
#include <QCoreApplication>
#include <QUrl>
#include <QString>
#include <QQuickView>
#include "src/passesmodel.h"
#include "src/passimageprovider.h"
int main(int argc, char *argv[])
{
QGuiApplication *app = new QGuiApplication(argc, (char**)argv);
app->setApplicationName("passes.s710");
qmlRegisterType<passes::PassesModel>("PassesModel", 1, 0, "PassesModel");
QQuickView *view = new QQuickView();
QQmlEngine *engine = view->engine();
engine->addImageProvider(QLatin1String("passes"), new passes::PassImageProvider());
view->setSource(QUrl("qrc:/Main.qml"));
view->setResizeMode(QQuickView::SizeRootObjectToView);
view->show();
return app->exec();
}