Porting Qt3 to Qt4: undefined reference
-
Hello,
I am having troubles trying to port a program in Qt3 to Qt4. The error messages I am getting are things such as
@undefined reference to 'PrintPreview::PrintPreview(QWidget*, char const*, bool, QFlagsQt::WindowType)@ I am getting a few of these errors.To take the example of the PrintPreview class, the files that are related to it are printpreview.h, printpreview.ui.h, and printpreview.ui.
The weird thing is that all of the errors I get are related to those that have .ui and .ui.h files.
I am unsure how to solve this and I couldn't find anything online that refers to this.
If you guys know what the problem is then please feel free to reply.
-
The usage of the generated ui header file has changed from Qt3 to Qt4. You might need to adapt your code for this manually. The docs have a page "Using a Designer UI File in Your Application":http://doc.qt.nokia.com/4.7/designer-using-a-ui-file.html that describes the various methods.