Hey, im trying to get the selected items of a treeview using the qitemselectionmodel... the treeview has the file listing already (using qfilesystemmodel) but when i use my code i get 4 entries back (for each entry clicked) i understand that each item returned has 4 of its own items like name, size etc...
so basically if one item is selected a 1x4 entry should be added in the list but instead i get 4x4... and this carries on for each additional selected item... 8x4 etc...
Qt Code:
QModelIndexList indexes = selectionModel->selectedIndexes(); QModelIndex index; list = new QList<QFileInfo>; foreach(index, indexes) { *list << model->fileInfo(index); }To copy to clipboard, switch view to plain text mode
where am i going wrong?? ?(
any help would be appreciated!
Thanks, Paul.
Bookmarks