I populate QTableWidget with double values. First I used QString::number(doubleValue, 'f', 2); . But when I sort the column, it was sorted wrong. Then I used setData(0, doubleValue). Now sorting is right I do not know how can I set decimal point to 2 ?