Quote Originally Posted by DeepDiver View Post
The only way I know of is to go for QTreeView and a Model, where the implementation of the method data() returns a QVariant containing an int or long.
This is very bad. My design is based on QTreeWidget and QTreeWidgetItem.

I do see QTreeWidgetItem::setData ( int column, int role, const QVariant & value )

When using this method, I pass "int" into the QVariant, the ordering is still based on alphabetic...So I wonder if QTreeView and a Model will do the trick?

Or do you mean I need to do the sorting myself in the data() method? That is not acceptable either...

Thanks