It's my first post here, so I would say hello to you!

I've got problem with QListView and QFileSystemModel. I've created a model:

Qt Code:
  1. model = new QFileSystemModel;
  2. model->setRootPath(QDir::currentPath());
To copy to clipboard, switch view to plain text mode 

and connected it with listView:

Qt Code:
  1. ui->listView->setModel(model);
  2. ui->listView->setRootIndex(model->index(tr("/home/lukasz/")));
To copy to clipboard, switch view to plain text mode 

Everything works good but one thing: selecting all of items. When I click ctrl+a, or invoke method selectAll():
Qt Code:
  1. ui->listView->selectAll();
To copy to clipboard, switch view to plain text mode 

method ui->listView->selectionModel()->selectedIndexes() returns number of highlighted files multipled by four. For example when I select manually all, four items, method selectedIndexes() returns number 4. But when I click ctrl+a or invoke selectAll(), selectedIndexes() returns 16.
I tried compiling on linux and on windows too - results are the same.
Here is a very simple project created with Qt Creator: link. It should help you, if solution of my problem isn't simple.

Regards