I just checked; multiselection works:
#include <QtGui>
int main(int argc, char *argv[])
{
QListView *l
= w.
findChild<QListView
*>
("listView");
if (l) {
}
if (t) {
}
return w.exec();
}
#include <QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QFileDialog w;
w.setFileMode(QFileDialog::DirectoryOnly);
w.setOption(QFileDialog::DontUseNativeDialog,true);
QListView *l = w.findChild<QListView*>("listView");
if (l) {
l->setSelectionMode(QAbstractItemView::MultiSelection);
}
QTreeView *t = w.findChild<QTreeView*>();
if (t) {
t->setSelectionMode(QAbstractItemView::MultiSelection);
}
return w.exec();
}
To copy to clipboard, switch view to plain text mode
It works no matter what I set the DontUseNativeDialog to. I can't seem to get the native dialog going! Strange!
I'm on Win7. Qt4.7. Mingw.
Joh
Bookmarks