How do I get the current file name and path within the foreach loop? I need to draw information from each one and put it into a vector.
Qt Code:
  1. QDir dir(path);
  2. QStringList filters;
  3. filters << "*.txt";
  4. foreach(QString file, dir.entryList(filters, QDir::Files)){
  5. QFile mine(/*file path? */);
  6. mine.open(QIODevice::ReadOnly);
  7. // stuff here
  8. }
To copy to clipboard, switch view to plain text mode