QComboBox > QListView
-
Hi. I am new to -QT- Qt and i have a Question:
I'll put the subfolderfiles from the parentfolder, who is shown in the QComboBox, in a QListView..
The Box show the right path but i can't find any way to get the subfolder to the ListView...can sombody help me?
sorry for my english..
-
Maybe "QDir::entryList":http://doc.qt.nokia.com/4.7/qdir.html#entryList-2 is what you are looking for ?
-
Really, I have no idea what you want to achieve. What are "subfolderfiles"? Are those entries in the file list that represent subfolders of the current folder? Or is that something else? And what is it exactly that you want do with that?
-
I don't get exactly what you need, but it sounds like "this thread":http://developer.qt.nokia.com/forums/viewthread/9783/ could be of use for you too.
-
I've solved so...
@
QDir dir;
dir.setPath (ListDir);for (int i=0;i<dir.entryList(QStringList("")).count();i++){
QString fileName = dir.entryList(QStringList("")).at(i);
ui->listWidget->addItem(fileName);
}
@thanks...
[EDIT: code formatting, please wrap in @-tags, Volker]