I have the same problem, but what i need to swap are the cell widgets, and getting the items don't work, the items get changed, but the cell widgets keep the same.

Is there any way of doing this?

Qt Code:
  1. QTableWidgetItem *item1 = colorizerTable->takeItem(row1, 0);
  2. QTableWidgetItem *item2 = colorizerTable->takeItem(row2, 0);
  3. colorizerTable->setItem(row1, 0, item2);
  4. colorizerTable->setItem(row2, 0, item1);
To copy to clipboard, switch view to plain text mode