| 2 | #include <QQmlApplicationEngine> |
| 3 | |
| 4 | int main(int argc, char *argv[]) |
| 5 | { |
| 6 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); |
| 7 | |
| 8 | QGuiApplication app(argc, argv); |
| 9 | |
| 10 | QQmlApplicationEngine engine; |
| 11 | const QUrl url(QStringLiteral("qrc:/main.qml")); |
| 12 | QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, |
| 13 | &app, [url](QObject *obj, const QUrl &objUrl) { |
| 14 | if (!obj && url == objUrl) |
| 15 | QCoreApplication::exit(-1); |
| 16 | }, Qt::QueuedConnection); |
| 17 | engine.load(url); |
| 18 | |
| 19 | return app.exec(); |
| 20 | } |
nothing calls this directly
no outgoing calls
no test coverage detected