views:

860

answers:

3

I am unable to open QT form file (*.ui) form visual studio 2008 QT project. It the following error " The file test.ui cannot be opened with Qt 4 form editor. Try converting the file using uic.exe "

Anyone know about this problem.?

I am using VS 2008 and QT 4.5.0

-Thanks for u r time.

+1  A: 

Are you sure that your *.ui file are in the qt4 format and not in the qt3 format ? If there have been created with qt3, ui.exe can convert them to qt4 !

Another reason could be the version of the qt-integration tool for visual studio 2008, Do you have the last version ? Can you open the *-ui file with Qt Designer ?

Matthieu
Tried this, didn't work. "<ui version="4.0">" present in *.ui file,i guess it is generated using Qt4
Suresh
+1  A: 

I had the same symptoms, and the solution was to remove the top line of the ui file (once open with a text editor)

Surprising that Qt does not support well formed xml...

Meilleures Salutations

thanks for the tip ! I haven't met this case ... Can you add some details about the line removed ?
Matthieu
A: 

Bingo! It worked, Thanks Antoine

Matthieu: remove the line

<?xml version="1.0" encoding="UTF-8"?>
Suresh
<?xml version="1.0" encoding="UTF-8"?>
Suresh