[Qt-interest] How to edit a file present in a resource at run-time ?
Louis Du Verdier
zemassacreur at yahoo.fr
Mon Nov 2 11:50:53 CET 2009
Hello,
For a project, I have to edit a file present in a resource, but at run-time.
I tried this code to test :
QFile f(":/Test.txt");
if(!f.open(QIODevice::ReadWrite | QIODevice::Text))
{
QMessageBox::critical(this, "Test", "Not working...");
return;
}
f.write(QString("OK !").toAscii());
QTextEdit *t = new QTextEdit(f.readAll());
t->show();
But the messageBox tell me that the file cannot be open in the ReadWrite mode.
I took a look in QRessource but nothing speak about how to write into a file present in the ressource.
So, how to write into a file present in the ressource when the application is running ?
Thanks,
Louis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091102/00663ab1/attachment.html
More information about the Qt-interest-old
mailing list