I have set a file to be read-only (right click and check readonly). Now when I try to remove the file using the function bool QDir::remove(const QString & fileName)
bool QDir::remove(const QString & fileName)
You can set file permissions with QFile
Of course this only for files you have user permission to do. The error may also be because the file is open in another app