[Qt-interest] Sort Indicator For QTableView Not Showing Up
Adrien Guinet
adrien at guinet.me
Wed Feb 8 07:47:45 CET 2012
Le 08/02/2012 07:43, Adrien Guinet a écrit :
> Hello,
>
> Have you tried to set frozenTableView->setSortingEnabled(true) ?
>
> Regards,
>
Sorry I've been a bit too fast... You already tried it. Are you using a proxy
model or not ?
For sorting a table view, what I do is usually:
* using a class that derives from QAbstractPorxyModel, or QSortFilterProxyModel
directly
* then do table_view->setSortingEnabled(true)
* and the magic happens :)
Maybe take a look at what QAbstractProxyModel does for this to happens correctly !
--
Adrien.
More information about the Qt-interest-old
mailing list