Unable to open Qt form (*.ui) files from Visual St

2019-08-30 22:37发布

I am unable to open QT form file (*.ui) from a Visual Studio 2008 Qt project. I'm using Qt 4.5.0. I get the the following error:

The file test.ui cannot be opened with Qt 4 form editor. Try converting the file using uic.exe

3条回答
该账号已被封号
2楼-- · 2019-08-30 22:55

Bingo! It worked, Thanks Antoine

Matthieu: remove the line

<?xml version="1.0" encoding="UTF-8"?>
查看更多
可以哭但决不认输i
3楼-- · 2019-08-30 22:58

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

查看更多
够拽才男人
4楼-- · 2019-08-30 23:00

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 ?

查看更多
登录 后发表回答