List widgets in a widget

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

List widgets in a widget
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()
            label = QLabel( n[1])


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.


is there any other way o achieve this?

Thank you in advance for your help.


PyQt mailing list    [hidden email]