Can someone tell me what is wrong with this code? It compiles fine, but I can’t seem to figure out how to set a directory.

Qt Code:
  1. #include <QtCore/QDir>
  2. #include <QtCore/QDirIterator>
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. void someFunction()
  8. {
  9. QString path = "C:/Users/";
  10. QDirIterator iter(path);
  11.  
  12. if(iter.fileInfo().exists() || iter.fileInfo().isDir() || iter.fileInfo().isFile())
  13. cout << iter.filePath().toStdString();
  14. else
  15. cout << "failed\n";
  16. }
  17.  
  18. int main()
  19. {
  20. someFunction();
  21.  
  22. getchar();
  23. return 0;
  24. }
To copy to clipboard, switch view to plain text mode 
It prints “failed” every time. What am I doing wrong?