aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/textrendering/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/textrendering/main.cpp')
-rw-r--r--tests/manual/textrendering/main.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/manual/textrendering/main.cpp b/tests/manual/textrendering/main.cpp
new file mode 100644
index 0000000000..0b2490f5df
--- /dev/null
+++ b/tests/manual/textrendering/main.cpp
@@ -0,0 +1,26 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+#include <QFontDatabase>
+
+int main(int argc, char *argv[])
+{
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+#endif
+ QGuiApplication app(argc, argv);
+ app.setOrganizationName("QtProject");
+
+ QQmlApplicationEngine engine;
+ const QUrl url(QStringLiteral("qrc:/main.qml"));
+ QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
+ &app, [url](QObject *obj, const QUrl &objUrl) {
+ if (!obj && url == objUrl)
+ QCoreApplication::exit(-1);
+ }, Qt::QueuedConnection);
+ engine.load(url);
+
+ return app.exec();
+}