Activate Fields with Radiobutton Qtdesigner

Asked

Viewed 9 times

0

On the main screen, I have a radiobutton with two fields of lineEdit. When the radiobutton is clicked (check), the lineEdit1 needs to be released and the lineEdit2 needs to be blocked. And so vice versa.

 if not self.radioButton_MNumeros.isChecked() == True:
        self.lineEdit_MNumeros.setEnabled(True)
        self.lineEdit_H.setDisabled(True)
 else:
        self.lineEdit_MNumeros.setDisabled(True)
        self.lineEdit_H.setEnabled(True)   

When the application starts the field lineEdit.Mnumeros is enabled and the field lineEdit. H is disabled. However, if I click radiobutton to enable the lineEdit_H and disable the lineEdit_MNumeres nothing happens.

I’m using Python3 and the interface was created with the Qtdesigner.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.