[Qt-interest] Saving XML DOM to file

Julien Cugnière julien.cugniere at gmail.com
Sun Nov 15 11:27:52 CET 2009


2009/11/15 Lane Christiansen <lanec42 at gmail.com>:
> This:
>
>    QFile file("config.xml");
>    QTextStream out(&file);
>    doc.save(out, INDENT, QDomNode::EncodingFromTextStream);
>    out.flush();
>    file.close();
>
> unfortunately, gives me nothing - the file never gets created. What am I doing
> wrong?

You forgot to open the file :-)

-- 
Julien Cugnière




More information about the Qt-interest-old mailing list