Hi!!
While creating a simple file browser, i wrote the following code in the constructor of the class DirectoryView->
QFileSystemModel *model=new QFileSystemModel;
QListView *ListView=new QListView(this);
ListView->setGeometry(0,59,240,260);
model->setRootPath(QDir::rootPath());
ListView->setModel(model);
ListView->setRootIndex(model->index(QDir::rootPath()));
ListView->show();
ui->lineEdit->setText(QDir::rootPath());//to display the current path
Now if i want the ListView to show the items inside the folder item which is clicked....what should i do??
How can i get the path or QModelIndex of the item i click at runtime??
Plz guide..
Bookmarks