The error message is self explanatory. You cannot copy a QFile (or any other QObject), and the copy constructor has been made private to enforce this. foreach() will be implicitly converting each string in your list to a QFile in a way that tries to invoke the copy constructor, e.g.
Qt Code:
  1. QFile foundFile = QString("test");
To copy to clipboard, switch view to plain text mode 
Your loop needs to be:
Qt Code:
  1. foreach(const QString &name, files) {
  2. QFile foundFile(name);
  3. // operations...
  4. }
To copy to clipboard, switch view to plain text mode