PDA

View Full Version : porting qt3 to qt4? ny suggestion?



oob2
24th October 2007, 19:22
I have a huge application which is written in qt3. It contains a lot of UI, thread(s), QSocketDevice(s), queue(s), canvas

I know it is time to move on to QT4. Since our application is huge, how do I start?

I read the QT document which showing how to do porting. But, not much help. When I add qt3support in project file and compile it, there are too many errors. Besides, if i want to get ride of QT3 (without qt3support), how to do it?

Thanks.

wysota
24th October 2007, 20:02
Going step by step is the only possible choice. Use the porting tool qt3to4 that comes with Qt - it will make a crude translation of your code and link it against the support library. If it doesn't compile, you have to start eliminating errors until it compiles. Then you can start porting functionality to obtain the effect you want.

darshan.hardas
25th October 2007, 11:31
can you tell me where can I access this porting tool?

I have Qt 4.3.2 installed can u state me the path where i can get this tool?

hugo vanwoerkom
25th October 2007, 16:10
I am going just that thing right now.
Large application: >100 modules 100K loc.
The app was started over 5 years ago on qt1 and added to over the years.
It will only run partially under qt4 after the qt3toqt4 conversion tool.
I hate to say it but you got to start from scratch and redesign it acc. to qt4 rules.
You'll never patch it up sufficiently to work right.

E.g. the menu buttons don't show up, among other things. But nobody can tell why things DO NOT work. You try change after change, but the problem is in the design, and that you cannot patch. Thanks Debian for keeping qt3 around!

wysota
25th October 2007, 17:05
can you tell me where can I access this porting tool?
It's in your Qt installation's bin subdirectory.


You'll never patch it up sufficiently to work right.
qt3to4 is not mean to "patch" things. It "just" translates class names. Some concepts changed between Qt3 and Qt4, so it's not possible to write an automatic porting tool.


E.g. the menu buttons don't show up, among other things. But nobody can tell why things DO NOT work.
I'm not sure what you mean by "menu buttons", but it's probably a matter of changing few lines of code. If you show it to us, maybe we'll be able to help.


Thanks Debian for keeping qt3 around!
They can't throw it out. It's a mandatory module of LSB and KDE relies on it. Qt3 will be part of modern Linux distros for years.