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.
filters << "*.txt";
foreach
(QString file, dir.
entryList(filters,
QDir::Files)){ QFile mine
(/*file path? */);
// stuff here
}
QDir dir(path);
QStringList filters;
filters << "*.txt";
foreach(QString file, dir.entryList(filters, QDir::Files)){
QFile mine(/*file path? */);
mine.open(QIODevice::ReadOnly);
// stuff here
}
To copy to clipboard, switch view to plain text mode
Bookmarks