Skip to content

Instantly share code, notes, and snippets.

@skhaz
Created August 23, 2012 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skhaz/3439187 to your computer and use it in GitHub Desktop.
Save skhaz/3439187 to your computer and use it in GitHub Desktop.
QFile *file = new QFile(filename);
QFileInfo info(*file);
QDir dir = info.dir();
QString filepath = dir.absolutePath();
if (!dir.mkpath(filepath)) {
qWarning("Error while creating the subdirectory %s", qPrintable(filepath));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment