Hi
I got the following code to copy some resource embedded files to file system.
It works fine with "css" and "htm" files but not with a "js" file (size 480kb), no errors issued but only the file name is there with size =0; what is wrong here?
Thanks.
QFile file("jscript.js");
QMessageBox::information(this,
"", tr
("Unable to open file"),
file.
errorString());
return;
}
if(!file.copy(":/scripts/jscript.js", "F:\\....\\jscript.js")
QMessageBox::information(this,
"",
file.
errorString());
QFile file("jscript.js");
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox::information(this, "", tr("Unable to open file"), file.errorString());
return;
}
if(!file.copy(":/scripts/jscript.js", "F:\\....\\jscript.js")
QMessageBox::information(this, "", file.errorString());
To copy to clipboard, switch view to plain text mode
Bookmarks