If I copy a resource file to a tmp cache dir... so...
MoveAndCopy(QString::fromUtf8(":/images/images/master.sql"),STATIC_TMP_SQL_DUMP);

after this file is readonly to user....
How i set write and remove from application? and edit from user?

Qt Code:
  1. bool Gui_Front::MoveAndCopy(QString file, QString destfile)
  2. {
  3. QFile Image(file);
  4. if (db->is_file(destfile)) {
  5. db->qt_unlink(destfile);
  6. }
  7. if (!Image.copy(destfile)) {
  8. /*QMessageBox::warning( this,tr( "File Error!" ) , tr("Unable to copy a file to.. %1").arg( destfile ));*/
  9. return false;
  10. } else {
  11. QFile Image2(destfile);
  12. Image2.setPermissions(QFile::WriteOther); /* all 0777 */
  13. return true;
  14. }
  15. }
To copy to clipboard, switch view to plain text mode