I am trying to sort my QTreeWidget, but I was wondering if there was a way to add Weights to the topLevelnodes. I mean I don't want people to sort it by say "name" column, because then it sorts my top level nodes, and the order becomes messed up.
What I want to do is keep top level nodes in a fixed order. But I want their children to be sorted normally by "name" column (which has everything).
Can I do this without subclassing and overriding sort()?
Perhaps install an event filter?
Or Is there some sort of "Weight" property I can add (Didn't see) ?




Reply With Quote
Bookmarks