Can someone explain why this works:
sTemp
= QDir::tempPath() + "/exfprogtemp.exf";
fTemp.setFileName(ui.eFile->text());
if(fTemp.exists(sTemp)) fTemp.remove(sTemp);
if(!fTemp.copy(ui.eFile->text(), sTemp)) fout("Can't create local temporary file");
sTemp = QDir::tempPath() + "/exfprogtemp.exf";
fTemp.setFileName(ui.eFile->text());
if(fTemp.exists(sTemp)) fTemp.remove(sTemp);
if(!fTemp.copy(ui.eFile->text(), sTemp)) fout("Can't create local temporary file");
To copy to clipboard, switch view to plain text mode
But this doesn't:
sTemp
= QDir::tempPath() + "/exfprogtemp.exf";
if(fTemp.exists(sTemp)) fTemp.remove(sTemp);
if(!fTemp.copy(ui.eFile->text(), sTemp)) fout("Can't create local temporary file");
sTemp = QDir::tempPath() + "/exfprogtemp.exf";
if(fTemp.exists(sTemp)) fTemp.remove(sTemp);
if(!fTemp.copy(ui.eFile->text(), sTemp)) fout("Can't create local temporary file");
To copy to clipboard, switch view to plain text mode
As far as I can tell the problem is that Qt can not handle to much copy/move/remove of a file if you haven't set a filename.
Is this how it's intended?
For me I would like to see the option to move/copy/remove a file without the need to create an QFile object.
Thanks in advance,
Bart.
Bookmarks