PDA

View Full Version : how to port from qt3 to qt4



narlapavan
21st June 2013, 08:02
i used uic3 for converting to qt4 from qt3 but i am unable to change .ui file i.e GUI(forms).
please help me in details steps how to convert from qt3 to qt4

Santosh Reddy
21st June 2013, 13:58
This should help Porting to Qt 4 (http://doc.qt.digia.com/4.0/porting4.html)

narlapavan
22nd June 2013, 06:23
i used following commands

uic3 FORM.ui > FORM.h
uic3 -impl FORM.h FORM.ui > FORM.cpp

uic3 -convert FORM.ui > FORM4.ui

qt3to4 PROJECT.pro

after doing this what is the use of FORM.h, FORM.cpp, FORM4.ui, i am unable to use these files in project. Suppose i want to change some widgets how can i change (through designer it's fine ), even if i changed through designer , if that .ui file is added in my project i am errors.

please help

ChrisW67
5th July 2013, 05:34
Doing this:


uic3 FORM.ui > FORM.h
uic3 -impl FORM.h FORM.ui > FORM.cpp

or this


uic3 -convert FORM.ui > FORM4.ui

are two separate approaches to the same problem. The second approach is the neatest. List the new ui file in your Qt4 project's PRO file FORMS variable. Then create the QWidget-derived wrapper class to use the form as described in the docs Santosh linked to. It is not magic, not completely automatic, not devoid of required understanding, and it is not without a level of effort on your part.

Once you have done that... if you strike problems then ask an intelligent question containing some information on what you have actually done, actually seen, and expected.