我试图使用qmake和Qt4编译一个.pro文件,以便从qttestrunnerlib.pro获取一个库,但是我得到了这个错误:
~/docs/UT_Cpp_Test/main/cppDir/src/qttestrunner$ qmake qttestrunnerlib.pro
uic: Error in line 6, column 14 : Unexpected element name
uic: Error in line 6, column 14 : Unexpected element name当我使用Qt3时,它可以工作,并且我成功地获得了我的库。但我想把它升级到Qt4。有可能吗?我该怎么做呢?
发布于 2012-09-29 01:05:52
我已经使用了qt3-support包中的uic3 (至少在gentoo上)
uic3 -convert ui-file-qt3.ui -o ui-file-qt4.ui
发布于 2012-05-25 16:49:09
这是因为qt4中的设计器与qt3中的设计器不同。表示qt3和qt4生成的ui文件不同。That's why the unexpected element name error!
The uic reads a user interface definition (.ui) file in XML as generated by Qt
Designer and creates corresponding C++ header or source files.
Easiest way to solve is, use your qt4 ide to open you form and it will ask for
conversion.Then use the newly created ui for your compilation. https://stackoverflow.com/questions/10751041
复制相似问题