I use QTableView + QStandardItemModel to display some data (data stored in some other data structure), and this table view is sortable.
Since it is sorted, when sorting this model I also need to sort the order of the stored data. I am trying to implement a slot for a sorting signal, but I do not know which signal is emitted when I click on the header to start the sorting action.
I tried a click, but it was emitted only for a data row, not for headerData. what should I do if I want to do something else when sorting QtableView + QStandardItemModel?
c ++ qt qt4 qtableview qabstractitemmodel
Claire huang
source share