Checking if a folder exists (and creating folders) in Qt, C++
The following “Folder” exists :
Create a new folder named as”MyFolder” :
The following solution is exists and it does not including intermediaries:
The best solution is:
To use QDir.mkpath() it returns true if the path already exists, in the other hand QDir.mkdir() returns false if the path already exists. So depending on this program have to choose which fits better.