Important: Please read the Qt Code of Conduct -

Ipmplementing QStandardItem::operator< for custom sorting: how to find out current sort column and direction?

  • How can I find out the current sort column and order from with QStandardItem ancestor? I have access to model, but it doesn't have any such methods.

  • I think it doesn't work that way. Since QStandardItem doesn't hold all the columns at once (like QTreeWidgetItem does), I can't sort items meaningfully. I have to use QSortFilterProxyModel, right?

Log in to reply