[Qt-interest] revert to model sort order in tableview

wim.delvaux at adaptiveplanet.com wim.delvaux at adaptiveplanet.com
Sun Oct 17 10:51:56 CEST 2010


Hi all,

I have this 'model' stack (base model with a few proxy models on top of it) 
set as model for a table view.

I have sorting enabled on the table view allowing me to click on a column and 
order it asc or desc.

However there is no way I can find to revert to the model order easily.  I.e. 
once I ordered a column the ordering remains active.

I Use a QSortOrderProxyModel in the model stack but at an unknown 'depth' so I 
cannot access the setSortColumn( -1 ) without ugly unfolding the model stack.

Are there more easy solutions ?

Suggestions 

W



More information about the Qt-interest-old mailing list