The problem is that your trying to delete you dir like this
Qt Code:
  1. QDir::rmdir( dirListing[i]);
To copy to clipboard, switch view to plain text mode 

But rmdir is not static. What you should do is create QDir object (let say QDir dir) and then
Qt Code:
  1. dir.rmdir(...);
To copy to clipboard, switch view to plain text mode