I'm developping a QGIS Plugin where the User clicks on the map, my plugin make a buffer and propose a street name, a street side and a disctrict, then the user selects which administration he's from and the status of the building select. After this the User needs to puts 3 values to add to our database.
So, I have a box with several inputs from the user.
I would like to set the "ok" button enabled only when all the inputs are filled.
Is there anyway to 'check' if everything is filled in each function and tell the button "ok you can go". Like the Checkbox but without a check by the user?
Here under part of the code for the first line with an user's input (adpn):
self.adpn_text = QLineEdit()
self.adpn_text.textChanged.connect(self.get_values_adpn)
self.layout.addRow(QLabel("Entrer l'ADPN (format = num):"), self.adpn_text)
def get_values_adpn(self, text):
self.adpn_values = text
def click_ok (self, click):
print("--- Récupère les données de l'User---")
print('ADPN User', self.adpn_values)