我正在尝试使用.pro
和Qt4编译qmake
文件以从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时,它可以工作,我成功地获得了我的lib。但是我想把它升级到Qt4。可能吗?我该怎么办?
答案 0 :(得分:2)
我使用了uic3
包中的qt3-support
(至少在gentoo上)
uic3 -convert ui-file-qt3.ui -o ui-file-qt4.ui
答案 1 :(得分:1)
这是因为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.