PDA

View Full Version : XML - Sax Engine, QXmlSimpleReader error



patterj
24th April 2008, 16:01
I'm trying to design a simple qt application, going step by step w/ a qt book. I'm on the part about designing an application that reads an xml file. However when I goto compile i get the following error in my header file: QXmlSimpleReader: No such file or directory

It's erroring on the following line:
#include <QXmlSimpleReader>

It looks like to me that the xml support wasn't installed in my qt install. Is this in fact the error? Is there a way to install this module/api?

I'm using the windows platform.

Jeremy

patterj
28th April 2008, 16:20
I believe I found the solution to my problem within QT.

Within your .pro file you have to include this line:


QT += xml

I found this in QtAssistant under the heading QtXML Module:


Applications that use Qt's XML classes need to be configured to be built against the QtXml module. The following declaration in a qmake project file ensures that an application is compiled and linked appropriately:
QT += xml
This line is necessary because only the QtCore and QtGui modules are used in the default build process.

After I added the line in my .pro file i received successful compile