diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-08 16:38:13 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:48:27 (GMT) |
commit | 6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9 (patch) | |
tree | a029fed808dab3f7202be7bc6519701aae445888 /Tests/QtAutogen/UicOnly | |
parent | 0b8597a86ee8bed2c34f52d309fd57b5f29a1595 (diff) | |
download | CMake-6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9.zip CMake-6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9.tar.gz CMake-6273b8354902e1af124d6f9b4a0ba23cf5e8a9b9.tar.bz2 |
Autogen: Tests: Separate uicOnly test
Diffstat (limited to 'Tests/QtAutogen/UicOnly')
-rw-r--r-- | Tests/QtAutogen/UicOnly/CMakeLists.txt | 10 | ||||
-rw-r--r-- | Tests/QtAutogen/UicOnly/uiconly.cpp | 18 | ||||
-rw-r--r-- | Tests/QtAutogen/UicOnly/uiconly.h | 20 | ||||
-rw-r--r-- | Tests/QtAutogen/UicOnly/uiconly.ui | 24 |
4 files changed, 72 insertions, 0 deletions
diff --git a/Tests/QtAutogen/UicOnly/CMakeLists.txt b/Tests/QtAutogen/UicOnly/CMakeLists.txt new file mode 100644 index 0000000..89a9a1b --- /dev/null +++ b/Tests/QtAutogen/UicOnly/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.10) +project(UicOnly) +include("../AutogenTest.cmake") + +# Test AUTOUIC being enabled only +# The moc is provided by the Qt macro +qtx_wrap_cpp(uicOnlyMoc uiconly.h) +add_executable(uicOnly uiconly.cpp ${uicOnlyMoc}) +set_property(TARGET uicOnly PROPERTY AUTOUIC ON) +target_link_libraries(uicOnly ${QT_LIBRARIES}) diff --git a/Tests/QtAutogen/UicOnly/uiconly.cpp b/Tests/QtAutogen/UicOnly/uiconly.cpp new file mode 100644 index 0000000..7b91b25 --- /dev/null +++ b/Tests/QtAutogen/UicOnly/uiconly.cpp @@ -0,0 +1,18 @@ + +#include "uiconly.h" + +UicOnly::UicOnly(QWidget* parent) + : QWidget(parent) + , ui(new Ui::UicOnly) +{ +} + +UicOnly::~UicOnly() +{ + delete ui; +} + +int main() +{ + return 0; +} diff --git a/Tests/QtAutogen/UicOnly/uiconly.h b/Tests/QtAutogen/UicOnly/uiconly.h new file mode 100644 index 0000000..8f4eebe --- /dev/null +++ b/Tests/QtAutogen/UicOnly/uiconly.h @@ -0,0 +1,20 @@ + +#ifndef UIC_ONLY_H +#define UIC_ONLY_H + +#include <QWidget> + +#include "ui_uiconly.h" + +class UicOnly : public QWidget +{ + Q_OBJECT +public: + explicit UicOnly(QWidget* parent = 0); + ~UicOnly(); + +private: + Ui::UicOnly* ui; +}; + +#endif diff --git a/Tests/QtAutogen/UicOnly/uiconly.ui b/Tests/QtAutogen/UicOnly/uiconly.ui new file mode 100644 index 0000000..13fb832 --- /dev/null +++ b/Tests/QtAutogen/UicOnly/uiconly.ui @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>UicOnly</class> + <widget class="QWidget" name="UicOnly"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QTreeView" name="treeView"/> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> |