Why can't I input a negative value in Qlineedit in pyqyt5?

时间:2019-03-19 15:03:25

标签: python pyqt5

def EnterInitial(self):
    try:
        mInitial = float(self.txtInitialTemp.text())
        if mInitial > -999999999:
            self.Check()
        else:
            self.txtInitialTemp.setText("0")
    except:
        self.txtInitialTemp.setText("0")

-1 is greater than -9999999999 but when I can't enter it in the specific line edit

0 个答案:

没有答案