Cannot copy js file from resource to file system
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.
Code:
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());
Re: Cannot copy js file from resource to file system
Is this you actual code?
How is trying to open the jscript.js file for reading related to the copying of the resource file to disk?
Line 7 doesn't make any sense, the static copy() method used in line 6 cannot affect the file instance "file".
Cheers,
_