how to let UIC generate BOTH header and source files?
in the .pro file, I defined both UI_HEADERS_DIR = ./uic/include UI_SOURCES_DIR = ./uic/src but after compiling, I only get the ui_x.h files, which contain both declarations and implementations.
Is this mean QMake can't produce a simple header file containing only the minimal declarations and put all the implementation details into source file?
This is a sample generated .h file, you can find both declarations and implementations are placed within the .h file:
Code:
/********************************************************************************
** Form generated from reading UI file 'DemoDialog.ui'
**
** Created: Thu 21. Jul 16:08:58 2011
** by: Qt User Interface Compiler version 4.7.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
QT_BEGIN_NAMESPACE
class Ui_DemoDialog
{
public:
{
if (DemoDialog->objectName().isEmpty())
DemoDialog
->setObjectName
(QString::fromUtf8("DemoDialog"));
DemoDialog->resize(400, 300);
retranslateUi(DemoDialog);
} // setupUi
void retranslateUi
(QDialog *DemoDialog
) {
} // retranslateUi
};
namespace Ui {
class DemoDialog: public Ui_DemoDialog {};
} // namespace Ui
QT_END_NAMESPACE
Re: how to let UIC generate BOTH header and source files?
UIC doesn't produce .cpp files.
Re: how to let UIC generate BOTH header and source files?
Quote:
Originally Posted by
wysota
UIC doesn't produce .cpp files.
Thanks with noted:-)