How do I check whether a file exists in a given path or not in Qt?
My current code is below:
QFile Fout("/Users/Hans/Desktop/result.txt");
if(!Fout.exists())
{
eh.handleError(8);
}
else
{
// ......
}
But when I run the code it is not giving the error message specified in handleError
even though the file I mentioned in the path does not exist.