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...) ?


Qt Code:
  1. folderDialog = new QDialog;
  2. folderDialog->setWindowModality(Qt::ApplicationModal);
  3. folderDialog->resize(800, 600);
  4. folderDialog->setWindowTitle("Selected Folder");
  5. folderDialogLayout = new QVBoxLayout;
  6.  
  7. folderModel = new QDirModel;
  8. folderModel->setFilter(QDir::Files);
  9. folderView = new QListView();
  10. folderView->setModel(folderModel);
  11. folderView->setSelectionMode(QAbstractItemView::MultiSelection);
  12. folderDialogLayout->addWidget(folderView);
  13. ...
  14. folderDialog->setLayout....
To copy to clipboard, switch view to plain text mode