summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qt_cmake_create/testdata/ui_project
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/tools/qt_cmake_create/testdata/ui_project')
-rw-r--r--tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected23
-rw-r--r--tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp11
-rw-r--r--tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp15
-rw-r--r--tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h21
-rw-r--r--tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui32
5 files changed, 102 insertions, 0 deletions
diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected b/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected
new file mode 100644
index 0000000000..6252b71389
--- /dev/null
+++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/CMakeLists.txt.expected
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.16)
+project(ui_project LANGUAGES CXX)
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
+qt_standard_project_setup()
+
+qt_add_executable(ui_project
+ main.cpp
+ widget.cpp
+ widget.h
+)
+
+target_sources(ui_project
+ PRIVATE
+ widget.ui
+)
+
+target_link_libraries(ui_project
+ PRIVATE
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp b/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp
new file mode 100644
index 0000000000..b0a4ec2647
--- /dev/null
+++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/main.cpp
@@ -0,0 +1,11 @@
+#include "widget.h"
+
+#include <QApplication>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ Widget w;
+ w.show();
+ return a.exec();
+}
diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp
new file mode 100644
index 0000000000..815d5f8c4b
--- /dev/null
+++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.cpp
@@ -0,0 +1,15 @@
+#include "widget.h"
+#include "ui_widget.h"
+
+Widget::Widget(QWidget *parent)
+ : QWidget(parent)
+ , ui(new Ui::Widget)
+{
+ ui->setupUi(this);
+}
+
+Widget::~Widget()
+{
+ delete ui;
+}
+
diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h
new file mode 100644
index 0000000000..1fe2322b13
--- /dev/null
+++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.h
@@ -0,0 +1,21 @@
+#ifndef WIDGET_H
+#define WIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+namespace Ui { class Widget; }
+QT_END_NAMESPACE
+
+class Widget : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Widget(QWidget *parent = nullptr);
+ ~Widget();
+
+private:
+ Ui::Widget *ui;
+};
+#endif // WIDGET_H
diff --git a/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui
new file mode 100644
index 0000000000..d2c4f620b1
--- /dev/null
+++ b/tests/auto/tools/qt_cmake_create/testdata/ui_project/widget.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Widget</class>
+ <widget class="QWidget" name="Widget">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Widget</string>
+ </property>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>6</y>
+ <width>781</width>
+ <height>581</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Now I have CMakeLists.txt. Thanks!</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>