PDA

View Full Version : QTreeView: get current sort column and order



supergillis
14th October 2008, 17:56
How can I get the current sort culumn and the order? I need this because I want to save the order to a file so I can automatically load the order on restart.

Is it possible to get the culumn width too?

spirit
14th October 2008, 18:25
use this method to determinate sort column


int QHeaderView::sortIndicatorSection () const

and use this method to determinate sort order


Qt::SortOrder QHeaderView::sortIndicatorOrder () const