Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
4.4.3
-
None
Description
Would be useful to have a setter function to suit function:
QStringList QFileDialog::selectedFiles () const
Is it possible to add this behavior to existing Qt 4.4.x and later with like following in a QFileDialog subclass:
setFileMode(QFileDialog::ExistingFiles);
...
QStringList currentList;
// populate with old values of QFileDialog::selectedFiles();
...
QListView view = findChild<QListView>("listView");
if (view && view->selectionModel()){
QItemSelectionModel *sectionModel = view->selectionModel();
QFileSystemModel model = (QFileSystemModel)view->model();
sectionModel->clear();
QModelIndex index;
foreach(const QString fileName, currentList)
}else
{ qWarning() << "Did not find listview"; }