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

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?

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