[Qt-interest] QXmlSreamReader

Sebastian Schöbinger sebastianlaptop at inode.at
Mon Apr 20 17:04:28 CEST 2009


hi

I have the book "C++ GUI Programming with Qt 4" and I want to make a
program, which reads den Strings out of the .xml file, during the runtime.

In the book, they load the file in the main.cpp like this:

int main [int argc, char *argv[])
{
QApplication app(argc, argv);
QStringList args = QApplication::arguments();
...
QTreeWidget
...
XmlStreamReader reader(&treeWidget);
for (int i = 1; i < args.count(); i++)
    reader.readFile(args[i]);
return app.exec();
}

during the runtime I can't use the command

reader.readFile(&file);

does the commang reader.setDevice(&file); do the same or where can I
write the command readFile to get the program working.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3674 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090420/569c4292/attachment.bin 


More information about the Qt-interest-old mailing list