错误:QtXml: No such file or directory

时间:2021-06-27 00:31:37

F:\Qt\QtCreater\DataManager-build-desktop-Qt_4_8_2__4_8_2____\..\DataManager\datamanager.h:5:

 错误:QDomDocument: No such file or directory

F:\Qt\QtCreater\DataManager-build-desktop-Qt_4_8_2__4_8_2____\..\DataManager\connection.h:6: 

错误:QtXml: No such file or directory


但是在头文件中已经包含QDomDocument和QtXml的头文件了

#include <QDomDocument>
#include <QtXml>


解决办法:在工程文件xxx.pro中添加一项QT +=xml即可