diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-02-02 12:19:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-02-04 18:21:43 (GMT) |
commit | 6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774 (patch) | |
tree | 8b1edb7c8940d5e7981a17df0fa6fdfc8cf7b875 /Tests/QtAutogen/sub | |
parent | 1fc9ecfae63447f9109475c1b1ffb6a2974458d9 (diff) | |
download | CMake-6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774.zip CMake-6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774.tar.gz CMake-6053ce22f69f58c9dc4db66dbfe62cdd8fbe2774.tar.bz2 |
QtAutogen: Make uic work even when the source is in a subdir.
Modify the includedUis to store the path to the file which includes
the ui file. Reuse that path to generate the output file from the
uic process.
Diffstat (limited to 'Tests/QtAutogen/sub')
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.cpp | 13 | ||||
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.h | 20 | ||||
-rw-r--r-- | Tests/QtAutogen/sub/uiconly.ui | 24 |
3 files changed, 57 insertions, 0 deletions
diff --git a/Tests/QtAutogen/sub/uiconly.cpp b/Tests/QtAutogen/sub/uiconly.cpp new file mode 100644 index 0000000..cdb3318 --- /dev/null +++ b/Tests/QtAutogen/sub/uiconly.cpp @@ -0,0 +1,13 @@ + +#include "uiconly.h" + +UicOnly::UicOnly(QWidget *parent) + : QWidget(parent), ui(new Ui::UicOnly) +{ + +} + +int main() +{ + return 0; +} diff --git a/Tests/QtAutogen/sub/uiconly.h b/Tests/QtAutogen/sub/uiconly.h new file mode 100644 index 0000000..9e21f82 --- /dev/null +++ b/Tests/QtAutogen/sub/uiconly.h @@ -0,0 +1,20 @@ + +#ifndef UIC_ONLY_H +#define UIC_ONLY_H + +#include <QWidget> +#include <memory> + +#include "ui_uiconly.h" + +class UicOnly : public QWidget +{ + Q_OBJECT +public: + explicit UicOnly(QWidget *parent = 0); + +private: + const std::auto_ptr<Ui::UicOnly> ui; +}; + +#endif diff --git a/Tests/QtAutogen/sub/uiconly.ui b/Tests/QtAutogen/sub/uiconly.ui new file mode 100644 index 0000000..13fb832 --- /dev/null +++ b/Tests/QtAutogen/sub/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> |