Get a list of files and folders in a particular directory
Unsolved
General and Desktop
-
Hi and welcome
Have a look at
http://doc.qt.io/qt-5/qdiriterator.htmlQDirIterator it(dir, QStringList() << "*.jpg", QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext())
qDebug() << it.next();for the icon, i think you can use
http://doc.qt.io/qt-5/qfileiconprovider.html#details -
U can get file name using below code.
QFile file("fileName.txt");
QFileInfo fileInfo(file.fileName());
QString filename(fileInfo.fileName());