当前位置:网站首页>Qt 使用QDomDocument读取xml文件
Qt 使用QDomDocument读取xml文件
2022-06-23 07:00:00 【妙为】
Qt系列文章目录
前言
MainWindow.obj error: LNK2019: 无法解析的外部符号 “__declspec(dllimport) public: __cdecl QDomDocument::QDomDocument(class QString const &)” (_imp[email protected]@[email protected]@@@Z),该符号在函数 “public: void __cdecl MainWindow::openXML(class QString)” ([email protected]@@[email protected]@@Z) 中被引用
MainWindow.obj error: LNK2019: 无法解析的外部符号 “__declspec(dllimport) public: __cdecl QDomDocument::~QDomDocument(void)” (_imp[email protected]@[email protected]),该符号在函数 “public: void __cdecl MainWindow::openXML(class QString)” ([email protected]@@[email protected]@@Z) 中被引用
一、错误原因
尽管加入各种dom的头文件还是没用
#include <QMainWindow>
#include <QtXml/QDomDocument>
#include <QtXml/QDomComment>
#include <QtXml/QDomElement>
#include <QTreeWidgetItem>
二、解决办法
QT += core gui
QT += xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
main.cpp \
MainWindow.cpp
HEADERS += \
MainWindow.h
FORMS += \
MainWindow.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${
TARGET}/bin
else: unix:!android: target.path = /opt/$${
TARGET}/bin
!isEmpty(target.path): INSTALLS += target


边栏推荐
- 20BN-Jester完整数据集下载
- 小爱音箱连接网络异常解决办法
- 传智教育 | 多人协作开发出现代码冲突,如何合并代码?
- Abnormal logic reasoning problem of Huawei software test written test
- [pit stepping record] a pit where the database connection is not closed and resources are released
- Tp6+redis+think-queue+supervisor implements the process resident message queue /job task
- Realization of rolling broadcast effect
- [AI practice] xgb Xgbregression multioutputregressor parameter 2 (GPU training model)
- unity转微信小程序小游戏
- 20bn Jester complete dataset Download
猜你喜欢

vs在连接SQL时出现的问题myconn.OPen();无法运行

Product axure9 (English version), prototype design background dynamic secondary menu display content
![[cloud computing event] vocational skill competition -- container development example pig rapid development framework](/img/4b/393b5980090330602a501867c60089.png)
[cloud computing event] vocational skill competition -- container development example pig rapid development framework

利用for循环输出一个字母三角形

20bn Jester complete dataset Download

Product axure9 (English version), prototype design and production pull-down secondary menu

Nacos adapts to oracle11g- modify the source code of Nacos

Solutions to abnormal network connection of Xiaoai speakers

Nacos适配oracle11g-修改Nacos源码

Live broadcast review | how can the container transformation of traditional applications be fast and stable?
随机推荐
如何优雅的快速下载谷歌云盘的大文件 (二)
【AI实战】XGBRegressor模型加速训练,使用GPU秒级训练XGBRegressor
HCIP之路第八次实验
Chain tour airship development farmers' world chain tour development land chain tour development
Online JSON to CSharp (c) class tool
Focusing on the industry, enabling customers | release of solutions for the five industries of the cloud container cloud product family
MySQL summary
Mysql(十一) — MySQL面试题整理
论文伪代码规范,伪代码在线编辑器,
[Laoke] how should ordinary people learn technology?
Product axure9 (English version), prototype design background dynamic secondary menu display content
WPS for thesis writing installs MathType plug-in to write mathematical formulas
RFID data security experiment: C # visual realization of parity check, CRC redundancy check and Hamming code check
vs在连接SQL时出现的问题myconn.OPen();无法运行
Tp6+redis+think-queue+supervisor implements the process resident message queue /job task
Ffplay realizes user-defined input stream playback
Unity图片加载和保存
3DMAX plug-in development environment configuration and fileexport and utilities template testing
Abnormal logic reasoning problem of Huawei software test written test
MySQL获取系统时间段