Greetings,

I am using a QTableWidget with both vertical and horizontal headers. How can I manually renumber the vertical row headers after a move?

When QHeaderView does a sort (when I click on a column header) the row header numbers do not change, only the contents of the cells. I am trying to do a similar thing using QHeaderView::moveSection() (kind of a custom sort).

Qt Code:
  1. QHeaderView* pHeaderView = verticalHeader();
  2. pHeaderView->moveSection( nSrcRow, nDestRow );
To copy to clipboard, switch view to plain text mode 
While the row contents are exchanged as I expect, the row header numbers also change. I would like to always keep a 1,2,3 kind of labeling like the built-in QHeaderView sort.