Hi, I have a TabWidget dinamicly populated with widgtes(QLabel and QLineEdit), and I need to know all the widgets by name in a way I can get their values. This is for a database application, and I want to get the name of the widgets that
are the name of the fields in the database.
the widget if populated like this:
field2Display = [[1, 'Titulo', 'pu_title'], [3, 'Autor', 'pu_author'], [2,'Titulo Original', 'pu_title_original']] for n in field2Display: dumLayout = QHBoxLayout() self.dum = QLineEdit() self.dum.setObjectName(n) label = QLabel( n) dumLayout.addWidget(label) dumLayout.addWidget(self.dum)
the first element is a index, the second is the namoe of the label, the third is the name os the widget and the name of the field.