diff options
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> |