Hi everyone,

I got somehting really weird and I wonder if you guys could help me :

I have a QListView that displays my items, and I want to get the indexes from any Extended Selection.
So I get the signal like this :

connect(centralView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelect ion)), this, SLOT(selectInTrace(QItemSelection,QItemSelection)) );

But, the problem is : no matter how many item I select in my centralView, only the last one is emitted by the SIGNAL selectionChanged. At first, I thought the selectionModel wasn't selecting all the wanted items, but, in my SLOT, I tried to use centralView->selectionModel()->selection() (instead of the first QItemSelection related to the selected items) and it effectively returns all the desired items...

Of course, I have set the central view selection mode as :

centralView->setSelectionMode(QAbstractItemView::ExtendedSelec tion);

Which confirms that the problem does not come from the selectionModel itself, but rather from the SIGNAL (at least, that is the only logical cause I have figured out).

The problem is not a real problem itself (my app have a decent behavior by using the centralView->selectionModel()->selection() ) but if someone could tell me how to fix this little bug, I will be quite thankful, for I feel like my code is a bit trashy.