Hi there,
I don't know how to import the thread from your old site(qtforum.org), so I'm asking here:
Is there a way to move columns of a list view programatically?
Basically, here's what I do:
I change the list view header's columns with
Qt Code:
  1. list_view->header()->moveColumn( column_no, to_idx );
To copy to clipboard, switch view to plain text mode 
but that does not change the contents.
Having looked through the QT sources, the ListView connects to the moved() signal emitted from the QHeader and in the slot that handles the signal triggerUpdate() is called.
I have tried this myself, e.g.
Qt Code:
  1. list_view->header()->moveColumn( column_no, to_idx );
  2. list_view->triggerUpdate();
To copy to clipboard, switch view to plain text mode 
No success, though. At some reason, the list view does not want to repaint its contents.
So, how the hell can i swap/move columns without iterating through all the items and swapping text as a mad one (that is stupid and slow enough, i want the operation to be faster).
Pleeeeeeease help!