If it is a directory as it seems to be, you wish to use the following API with Qt 5:
as opposed to QFile
. Therefore, you would be writing something like this:
QString location = "/path/to/app/Application.app";
QDir *rmDir = new QDir(location);
rmDir->removeRecursively();
Note that I would not personally use a heap object just for this. Stack object would suffice in this simple case.