Aug-04-2020, 12:39 PM
Dear all,
I got one question.
There are 3 rows.
First row refer to self.bat_loss, QlineEdit
Second row is self.factor, QDoublespinbox
Third row is self.modified_loss, QlineEdit
Current progress:
First and third row are READ only.
I change factor at second row will update third row value.
But I want to include the change in third row and update second row value.
May I know how to do that?
Thanks
I got one question.
There are 3 rows.
First row refer to self.bat_loss, QlineEdit
Second row is self.factor, QDoublespinbox
Third row is self.modified_loss, QlineEdit
Current progress:
First and third row are READ only.
I change factor at second row will update third row value.
But I want to include the change in third row and update second row value.
May I know how to do that?
Thanks
self.factor.valueChanged.connect(self.valuechange) self.valuechange() concept_loss = float(self.modified_loss.text()) concept_bat_loss = format(concept_loss, '.2f') self.modified_loss.setText(concept_bat_loss) def valuechange(self): self.modified_loss.setText(str(self.factor.value() * self.bat_loss))