summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/windeployqt/testapp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/windeployqt/testapp')
-rw-r--r--tests/auto/tools/windeployqt/testapp/CMakeLists.txt20
-rw-r--r--tests/auto/tools/windeployqt/testapp/main.cpp21
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/auto/tools/windeployqt/testapp/CMakeLists.txt b/tests/auto/tools/windeployqt/testapp/CMakeLists.txt
new file mode 100644
index 0000000000..ce94cd6464
--- /dev/null
+++ b/tests/auto/tools/windeployqt/testapp/CMakeLists.txt
@@ -0,0 +1,20 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+#####################################################################
+## testapp Binary:
+#####################################################################
+
+qt_internal_add_executable(windeploy_testapp
+ GUI
+ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/"
+ SOURCES
+ main.cpp
+ LIBRARIES
+ Qt::Gui
+)
+
+set_target_properties(windeploy_testapp
+ PROPERTIES
+ OUTPUT_NAME testapp
+)
diff --git a/tests/auto/tools/windeployqt/testapp/main.cpp b/tests/auto/tools/windeployqt/testapp/main.cpp
new file mode 100644
index 0000000000..775fe19827
--- /dev/null
+++ b/tests/auto/tools/windeployqt/testapp/main.cpp
@@ -0,0 +1,21 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+#include <QGuiApplication>
+#include <QRasterWindow>
+#include <QScreen>
+#include <QTimer>
+
+// Simple test application just to verify that it comes up properly
+
+int main(int argc, char ** argv)
+{
+ QGuiApplication app(argc, argv);
+ QRasterWindow w;
+ w.setTitle("windeployqt test application");
+ const QRect availableGeometry = QGuiApplication::primaryScreen()->availableGeometry();
+ w.resize(availableGeometry.size() / 4);
+ w.show();
+ QTimer::singleShot(200, &w, &QCoreApplication::quit);
+ return app.exec();
+}