My question is about the way the QTableWidget displays the cell values.
I'd like for the cell to show only three decimals when it's not being edited and show the full value when you double click for editing.
I am doing calculations in background and then setting the cell value afterwards.
V_D = 3/0.7
self.TableWidget.setItem(0, 0, QTableWidgetItem(str(V_D)))
Similar to the way excel formats the cell to show certain number of digits.
Full Value:
Display Value:
How would I go about doing this?

