1 Attachment(s)
How to get 2nd column data from QFileSystemModel on QListView
I'm using a QFileSystemModel to show data on both QTableView & QListView. Instead of default data, I want to show the data from 3nd column in the model on QListView.
How can I do that?
Attachment 13756
Code:
int main(int argc, char *argv[])
{
numbers << "One" << "Two" << "Three" << "Four" << "Five";
QFileSystemModel *model = new QFileSystemModel;
model
->setRootPath
(QDir::currentPath());
table->setModel(model);
list->setModel(model);
splitter->show();
return a.exec();
}
Re: How to get 2nd column data from QFileSystemModel on QListView