-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
25 lines (19 loc) · 676 Bytes
/
Copy pathmain.cpp
File metadata and controls
25 lines (19 loc) · 676 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
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include "backend.h"
#include "taskmodel.h"
#include "taskitem.h"
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
qRegisterMetaType<model::TaskItem*>("TaskItem*");
qRegisterMetaType<Backend*>("Backend*");
qmlRegisterType<model::TaskModel>("iproapps.besttodolist", 1, 0, "TaskModel");
Backend backend;
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty("backend", &backend);
engine.load(QUrl(QLatin1String("qrc:/main.qml")));
return app.exec();
}