16084
|
1 |
#include <QGuiApplication>
|
|
2 |
#include <QQmlApplicationEngine>
|
|
3 |
#include <QQmlContext>
|
|
4 |
|
|
5 |
#include "tracer.h"
|
|
6 |
|
|
7 |
int main(int argc, char *argv[]) {
|
|
8 |
QGuiApplication app(argc, argv);
|
|
9 |
|
|
10 |
QQmlApplicationEngine engine;
|
|
11 |
|
|
12 |
// Tracer tracer;
|
|
13 |
// engine.rootContext()->setContextProperty(QStringLiteral("tracer"),
|
|
14 |
// &tracer);
|
|
15 |
|
|
16 |
QObject::connect(
|
|
17 |
&engine, &QQmlApplicationEngine::objectCreationFailed, &app,
|
|
18 |
[]() { QCoreApplication::exit(-1); }, Qt::QueuedConnection);
|
|
19 |
engine.loadFromModule("hhtracer", "Main");
|
|
20 |
|
|
21 |
return app.exec();
|
|
22 |
}
|