[Solved] Porting from Qt3 to Qt4 - qt3porting.xml file not found



  • Hi,

    I have installed Qt4.7.3 on Windows 7 using the offline Windows installer and I am having trouble porting my Qt3 program to Qt4, particularly with a missing qt3porting.xml file.

    I am following the procedure shown in the "Porting to Qt4":http://doc.qt.nokia.com/4.0/porting4.html document by Nokia. However, I am stuck at the point where I run qt3to4. When I tried to execute "qt3to4 cuviewer.pro" I get the following error message:
    "Error: Could not find the q3porting.xml rule file: Please try specifying the location of the file with the -rulesFile option".

    So I tried to find the location of the q3porting.xml file in the QtSDK folder. What I tried was I did a search for the q3porting.xml file across the entire QtSDK folder, however the search came up with no results.

    I am stumped. I was looking for anyone else with this problem but I my search came up short. If anyone knows where the q3porting.xml file is located or if I can port my program to Qt4 without the file (and without excessive effort) then your advice would be most helpful.



  • I is probably part of the Qt Sources (Which are not installed by default). You can get a current copy of the file "here":http://qt.gitorious.org/qt/qt/blobs/4.7/tools/porting/src/q3porting.xml . However, if you will probably still have to rewrite parts of your application, as the Qt3 support classes will be dropped with Qt5 (Assuming you want to upgrade to Qt5 once it is released).



  • Thanks, I got the qt3to4 part working now.

    However, now I'm stuck on porting the .ui files to Qt4.
    When I attempt to execute the line "uic3 -convert mainwindow.ui > mainwindow.ui" the error message is similar to before:
    "Error: Could not find rules file: q3porting.xml"

    The only problem is that I can't tell the uic3 program where the rules file is. Is there another way around this?

    Edit:
    Never mind, I uninstalled Qt and built it from source instead. Took about 10 hours for me but at least I got the files in the right place now! Thanks for telling me about that gitorious thing bro.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.