for i,txt in enumerate(lst):
  edit = getattr(self, 'lineEdit_%d' % i)
  edit.settext(txt)

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of
> [email protected]
> Sent: Tuesday, October 11, 2011 8:49 AM
> To: [email protected]
> Subject: [PyQt] get list of object
> 
> Hello i have create a simple project useng eric
> i have 10 line edit called self.lineEdit, self.lineEdit_2 etc....
> now i have a list with 20 string to put in the lineedit
> for each item in the list i have to do self.lineEdit.settext(list[0]), self.
> lineEdit_2.settext(list[2])
> or there is a easy way?
> 
> Thanks Luca
> _______________________________________________
> PyQt mailing list    [email protected]
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to