Skip to content

Instantly share code, notes, and snippets.

@skhaz
Created August 23, 2012 17:35
Show Gist options
  • 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