0
I created 5 pages with Qt5designer, each page has several Qlineedid. I switched to python. The application gets very extensive and repetitive. I need to simplify capturing the name that is in focus and read or write the data.
def open_pag3(self):
self.stW.setCurrentWidget(self.page_3)
self.labelTitulo.setText(u'Paths')
self.cr_ab.editingFinished.connect(self.values_in)
self.cr_ab_1.editingFinished.connect(self.values_in)
self.cr_ab_2.editingFinished.connect(self.values_in)
self.cr_in_ext.editingFinished.connect(self.values_in)
self.cr_sd_mach.editingFinished.connect(self.values_in)
self.cr_fc_1.editingFinished.connect(self.values_in)
self.cr_fc_ent_mach.editingFinished.connect(self.values_in)
self.cr_md_fec.editingFinished.connect(self.values_in)
self.cr_prot.editingFinished.connect(self.values_in)
self.cr_1_inj.editingFinished.connect(self.values_in)
self.cr_2_inj.editingFinished.connect(self.values_in)
self.cr_3_inj.editingFinished.connect(self.values_in)
self.cr_almf.editingFinished.connect(self.values_in)
self.cr_rec.editingFinished.connect(self.values_in)
self.cr_dos.editingFinished.connect(self.values_in)
self.cr_pos_desc.editingFinished.connect(self.values_in)
self.cr_pre_desc.editingFinished.connect(self.values_in)
self.cr_am_bic.editingFinished.connect(self.values_in)
self.cr_bic_atr.editingFinished.connect(self.values_in)
self.cr_bic_fr.editingFinished.connect(self.values_in)
That’s a small part and it’s already too long. The idea is very simple
def mostrar_valor_campo():
nome = campo_em_foco('name')
return nome
I really appreciate the help.