当前位置:网站首页>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


边栏推荐
- Spock约束-调用频率/目标/方法参数
- 【星球精选】如何高效构建 Roam 与 theBrain 间细粒度双向链接?
- 【Veusz】导入CSV中的二维数据
- 测试apk-异常管控NetTraffic攻击者开发
- Chain tour airship development farmers' world chain tour development land chain tour development
- Feelm joined the Carbon Disclosure Project as an initiative of Smallville to deal with climate change emergencies
- Design of temperature detection and alarm system based on 51 single chip microcomputer
- Realization of rolling broadcast effect
- C WPF realizes dynamic loading of controls through binding
- 【博弈论】基础知识
猜你喜欢

C WPF additional attribute implementation interface defines decorator
![[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

测试apk-异常管控NetTraffic攻击者开发

JS to determine the added and decreased elements of two arrays

Cirium has gradually become the standard for airlines' carbon dioxide emission reporting

MySQL Niuke brush questions

MySQL (IV) - MySQL storage engine

Here comes the dry goods | PAAS collection to see first ~

Detailed explanation of redis persistence, master-slave and sentry architecture

YGG 西班牙 subDAO——Ola GG 正式成立
随机推荐
Online JSON to CSharp (c) class tool
Tp6+redis+think-queue+supervisor implements the process resident message queue /job task
Arthas thread command locates thread deadlock
How to tag and label naming before the project release
How bootstrap clears floating styles
codeforce 158B Taxi
【AI实战】机器学习数据处理之数据归一化、标准化
C WPF realizes dynamic loading of controls through binding
RTMP streaming exception fast recovery scheme
Console Application
MySQL(四) — MySQL存储引擎
C WPF additional attribute implementation interface defines decorator
HCIP之路MPLS
Difference between char and varchar
User mode and kernel mode
codeforce 158B Taxi
[* * * array * * *]
Eureka service registration and discovery
U-Net: Convolutional Networks for Biomedical Image Segmentation
yolov5检测小目标(附源码)