PDA

View Full Version : Porting Qt3 To Qt4



fruzzo
6th August 2008, 14:30
I've an application to migrate from Qt3 to Qt4...I've see this dochttp://doc.trolltech.com/4.4/porting4.html but I've just some problems with the includes...I've added at my project:
..\include\Qt3Support
..\include\QtCore
..\include\QtGui
..\include\
but it seem still don't recognize some objects, why? Some tricks and tips?

triperzonak
6th August 2008, 14:59
first use "qt3to4 yourproject.pro" it will rename and include libraries, but sometimes you will need to add manually some libraries.

then convert your ui or use ui3

if you convert your ui by opening it to designer 4.4

open yourproject.pro or in linux src.pro?

then remove forms3 and config+= ui3

then add the converted ui to your project by forms+= or manually add it (right + click + add)

change all your #include "ui.h" to #include "ui_ui.h" (remember "ui_" )
then declare your UI as public/private Ui::your_ui

then use setupUi(this); in constructor..

i donno how ui3 works

ex. my.h


#include "ui_myui.h"
class myclass: public QDialog, public Ui::myform


my.cpp

#include my.h
myclass::myclass(some parameter)
:QDialog(some parameter)
{
setupUi(this);
}



note: this only one step (what i used) and i am aware that there are many and much easy steps..