oboy/src/qt/main.cpp

25 lines
508 B
C++
Raw Normal View History

2019-05-11 15:56:42 +02:00
#include <QGuiApplication>
2016-03-06 21:33:37 +01:00
#include <QQmlApplicationEngine>
2019-05-11 15:56:42 +02:00
#include <iostream>
#include <string>
2016-03-06 21:33:37 +01:00
2019-05-08 23:09:31 +02:00
#include <caml/mlvalues.h>
#include <caml/callback.h>
2019-05-11 21:13:09 +02:00
#include "oboy.h"
2019-05-11 15:56:42 +02:00
2016-03-06 21:33:37 +01:00
int main(int argc, char *argv[])
{
2019-05-11 15:56:42 +02:00
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);
2016-03-06 21:33:37 +01:00
2019-05-11 21:13:09 +02:00
qmlRegisterType<OBoy>("com.oboy.oboy", 1, 0, "OBoy");
2016-03-06 21:33:37 +01:00
QQmlApplicationEngine engine;
2019-05-13 14:02:02 +02:00
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
2016-03-06 21:33:37 +01:00
2019-05-11 21:13:09 +02:00
caml_main(argv);
2019-05-11 15:56:42 +02:00
2016-03-06 21:33:37 +01:00
return app.exec();
}