Hi
I'm working on a storyboard program, and something puzzles me.
I'm saving the storyboard pads as PNG-files. If I want to erase a pad, I want to erase the file as well.
Here is the code. ('ret' is the return value from a QMessageBox)
There are three qDebug-messages:Qt Code:
qDebug() << projFilePath + sceneDir + "/" + padInfo[fileName]; QFile fPad; fPad.setFileName(projFilePath + sceneDir + "/" + padInfo[fileName]); switch (ret) { qDebug() << "OK pressed"; if (!fPad.remove()) qDebug() << "delete file failure";To copy to clipboard, switch view to plain text mode
The first writes the correct path. It is checked and doublechecked.
The second is written and proves that I indeed pressed 'OK'.
The third is not written, meaning that the file was removed.
When I run the code in debug mode, the file 'fPad' goes from 'exists = true' to 'exists = false'.
But - the file is not deleted... Please help with any suggestions to solve this.
Bookmarks