Python - Format Float To Decimal In Pyqt
I have this code in pyQt: calculation = day + night self.label.setText(repr(calculation * 30) and I can see result as: 3.7446232 but I would like to see as 3.74. Could you pleas
Solution 1:
self.lineEdit_4.setText("%.2f"%(row[3]))
Post a Comment for "Python - Format Float To Decimal In Pyqt"