PDA

View Full Version : Customizing Sorting



delalaym
11th March 2009, 17:51
Hello,

In QT3 I reimplement "compare" in my QListViewItem. But now in QT4, I am using QTreeWidgetItem and I don't know how to customize the sorting. I want to sort alphabetically except for one item in the tree that I always want at the end.

How do I do that?

Thanks.

Marc-Andre

spirit
11th March 2009, 17:54
derive your own item from QTreeWidgetItem and reimplement


virtual bool operator< ( const QTreeWidgetItem & other ) const

ComaWhite
12th March 2009, 00:22
What about QSortFilterProxyModel