hi,
i have a problem using a QDialog to hold a QListView. The dialog displays all files in a selected folder. So far, everything works fine, all files are selectable and have a correct status (selected/unselected). The Problem: Pressing control(strg) + a selects all the displayed files. I didn't implement that, so i assume either the QDialog or the QListView accepts this event. Unfortunately, the strg+a - selection selects all items but gives a wrong amout of contained items. if there are 35 items in a folder, strg+a select them all but sets there number to 140 (x4 everytime).
How can i disable the strg+a selection or overwrite it ? is there a solution without subclassing QDialog or QListView (hell of a work for me in both cases due to a huge project...) ?
folderDialog->setWindowModality(Qt::ApplicationModal);
folderDialog->resize(800, 600);
folderDialog->setWindowTitle("Selected Folder");
folderModel
->setFilter
(QDir::Files);
folderView->setModel(folderModel);
folderDialogLayout->addWidget(folderView);
...
folderDialog->setLayout....
folderDialog = new QDialog;
folderDialog->setWindowModality(Qt::ApplicationModal);
folderDialog->resize(800, 600);
folderDialog->setWindowTitle("Selected Folder");
folderDialogLayout = new QVBoxLayout;
folderModel = new QDirModel;
folderModel->setFilter(QDir::Files);
folderView = new QListView();
folderView->setModel(folderModel);
folderView->setSelectionMode(QAbstractItemView::MultiSelection);
folderDialogLayout->addWidget(folderView);
...
folderDialog->setLayout....
To copy to clipboard, switch view to plain text mode
Bookmarks