ZX_SA have already posted a simplier solution, but anyway:
Lets assume that you have a StartDialogStub class as a startdialogstub.ui file.
uic will generate startdialogstub.h file with definition of this class. You can easily create a new class,
say StartDialog which inherits the StartDialogStub:
|
Source code
|
1
2
3
4
5
6
7
8
|
#include "startdialogstub.h"
class StartDialog : public StartDialogStub
{
Q_OBJECT:
public:
... // you have to add proper method declarations here
}
|
Then you have to add your code to startdialog.cpp file.
To compile your project you have to add those two new files to your .pro file (one in HEADERS and
other in SOURCES list) and generate new Makefile by invoking "qmake".
I prefer this method over the .ui.h files, because this way I can generate proper documentation of the
StartDialog class using Doxygen (there might be a better solution, but this works

).