I've reimplemented compare in this way:

Qt Code:
  1. int KMListViewItem::compare(QListViewItem * i, int col, bool ascending) const
  2. {
  3. qDebug("compare()");
  4.  
  5. Q_UNUSED(i);
  6. Q_UNUSED(col);
  7. Q_UNUSED(ascending);
  8.  
  9. return 0;
  10. }
To copy to clipboard, switch view to plain text mode 

It should work but it doesn't (items are moved). I think the only solution is to use setSorting(-1) and then use QHeader's setSortIndicator.