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

依然范特西╮ 提交于 2019-12-11 17:13:55

问题


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

回答1:


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




回答2:


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 ?




回答3:


Bingo! It worked, Thanks Antoine

Matthieu: remove the line

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


来源:https://stackoverflow.com/questions/1109300/unable-to-open-qt-form-ui-files-from-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!