QDomDocument was not declared in this scope
Hi
I am trying to use QDomDocument. When I try to compile I get: QDomDocument was not declared in this scope.
I heard that you need to add "QT += XML" to the pro. I tried the following and it didn't work:
Code:
TARGET = trial1
TEMPLATE = app
SOURCES += main.cpp \
startupdialog.cpp \
phonebook.cpp \
configure.cpp \
advanced.cpp \
modules/borderlayout.cpp
HEADERS += startupdialog.h \
phonebook.h \
configure.h \
advanced.h \
modules/borderlayout.h
FORMS += startupdialog.ui \
phonebook.ui \
configure.ui \
advanced.ui
RESOURCES += jddi.qrc
QT += XML
Any ideas?
Thanks
Brendan
Re: QDomDocument was not declared in this scope
Did you run qmake again for the new pro file??
Also check if you're missing some includes in your source.
Re: QDomDocument was not declared in this scope
may be its "xml" and not "XML"
Re: QDomDocument was not declared in this scope
Thanks for reply.
I compile with QT Creator under Windows XP.
I have tried Building All.
I also added
Code:
#include <QDomDocument>
The compiler now also shows: QDomDocument: No such file or directory
I guess I must be missing something basic. :confused:
Re: QDomDocument was not declared in this scope
Thanks MrDeath
Lowercase xml did the job :D
I wonder if thats why I couldn't seem to get anything useful from QXmlStreamReader ? It did compile however (I gave up on QXmlStreamReader and had a crack at QDom).
Re: QDomDocument was not declared in this scope
QXmlStreamReader doesn't depend on the xml module - so the answer is "no".