Either set the numbers as integers, not as text or provide a custom QTableWidgetItem::operator<().
Approach 1:
Qt Code:
int i = 0; item->setData(Qt::DisplayRole, i); // but thisTo copy to clipboard, switch view to plain text mode
Approach 2:
Subclass QTableWidgetItem, override QTableWidgetItem::operator<().
Bookmarks