[Solved] QTableView selectionChanged event question
General and Desktop
3
Posts
2
Posters
2.5k
Views
1
Watching
-
Hi,
I'm using a QTableView and have a function which is called when the selectionChanged event occurs. However, I'm not sure it is triggered when I'd expect (it seems a bit strange). Specifically:
As each row is selected (I'm using row selection) the selectionChanged event is triggered, as expected.
What I can't understand is that the event does not get triggered when, for example, the table is sorted by pressing a column header. In this case, the current row is deselected, but the selectionChanged event is not triggered.
Am I wrong to think point 2 above should trigger the selectionChanged event? The selection has changed because nothing is now selected and it was before the sort?
For information I'm using Qt 5.3.0.
Thanks.
-
Hi,
Nice you found out and thanks for sharing !
Please, update the thread title prepending [solved] so other forum users may know a solution has been found :)