Answer the question
In order to leave comments, you need to log in
What does ".15g" do with format(float...?
This is a calculator. Line 3 allows you to display only the entered numbers, without zeros and commas.
what does ".15g" do anyway? Are there analogues?
def displayNumber(self,value):
text = self.sender()
newLabel = format(float(self.ui.label.text() + text.text()),".15g")
self.ui.label.setText(newLabel)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question