[PyQt] How to get the list of widgets names in a form

volkan kepoglu vkepoglu at gmail.com
Fri Mar 7 12:47:25 GMT 2008


Hi Phil,
I am trying to write a plugin for Qgis. The plugin will do
spatial data analysis. I am using PyQt4 in python 2.5.
In one form/dialog, there are several Qwidgets like
QLineEdit and QLabel. I want to get the list of
Qwidgets name, Qwidgets type (like QLineEdit, QLabel)
and Qwidgets default value (my_qlabel.text()) and assign
these values to python list. I mean that trying to get
a list like;

list_widgets_name = ["my_qlineEdit", "my_qlabel"]
list_widgets_type = ["QLineEdit", "QLabel"]
list_widgets_value = ["Hello world", "Thanks a lot"]

Could you please help me? Is there a qt-class having
the list of widgets in the form? or where to look?

Regards,
Volkan Kepoglu
PHD Candidate
Department of GGIT in METU.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20080307/023d3703/attachment.html


More information about the PyQt mailing list