Sunday, January 9, 2011

Delete a folder in Qt

This code snippet allows programmer to delete a folder in Qt

#include <QDir>

void deleteDir(const std::string& foldername)
{

  QDir dir;
  dir.rmdir(foldername.c_str());
}

No comments:

Post a Comment