[PyQt] Easy way to save the text of all QlineEdit widgets?

Giovanni Bajo rasky at develer.com
Mon Sep 17 16:21:00 BST 2007

On 9/17/2007 4:59 PM, John Wheez wrote:

> Is there a function in pyQt which will iterate over the existing QlineEdit
> widgets and make a list/dictionary with the widget name and it's current 
> text?

dict((unicode(w.objectName()), unicode(w.text()))
      for w in mainwidget.findChildren(QLineEdit)))
Giovanni Bajo

More information about the PyQt mailing list