The objects that you put into your 'files' list have gone out of scope and were destroyed. Use the 'new' operator to allocate them instead. Be sure to delete them when you are done or you will have a memory leak.
QFile* file = new QFile(QDir::toNativeSeparators(path));
if(file->exists()){
files.append(file);
}