My code is pretty simple:
void DirManagement::listFiles(QDir dir) { QFileInfoList list = dir.entryInfoList(QDir::NoFilter, QDir::NoSort); for (int i = 0; i < list.size(); ++i) { QFileInfo fInfo = list.at(i); QString fPath = fInfo.absoluteFilePath(); qDebug() << "# " << i << fPath; } }
The problem is that if my directory path is: "/ home / adasi / Desktop / GCUFolder" this is the result:
# 0 "/home/Alya/Desktop/MCUFolder" # 1 "/home/Alya/Desktop" # 2 "/home/Alya/Desktop/MCUFolder/32Mon Oct 24 2011" # 3 "/home/Alya/Desktop/MCUFolder/32Sun Oct 23 2011"
However, what I expect is ONLY according to this directory:
# 0 "/home/Alya/Desktop/MCUFolder/32Mon Oct 24 2011" # 1 "/home/Alya/Desktop/MCUFolder/32Sun Oct 23 2011"
I tried most qt filters. Does not work.
source share