diff options
Diffstat (limited to 'tests/manual/qmlls-cmake-builds/main.cpp')
-rw-r--r-- | tests/manual/qmlls-cmake-builds/main.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/manual/qmlls-cmake-builds/main.cpp b/tests/manual/qmlls-cmake-builds/main.cpp new file mode 100644 index 0000000000..a0cb14629e --- /dev/null +++ b/tests/manual/qmlls-cmake-builds/main.cpp @@ -0,0 +1,22 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#include <QGuiApplication> +#include <QQmlApplicationEngine> + +int main(int argc, char *argv[]) +{ + QGuiApplication app(argc, argv); + + QQmlApplicationEngine engine; + const QUrl url(u"qrc:/autoGenCMake/Main.qml"_qs); + QObject::connect( + &engine, + &QQmlApplicationEngine::objectCreationFailed, + &app, + []() { QCoreApplication::exit(-1); }, + Qt::QueuedConnection); + engine.load(url); + + return app.exec(); +} |