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

> -----Original Message-----
> From: pyqt-boun...@riverbankcomputing.com 
> [mailto:pyqt-boun...@riverbankcomputing.com] On Behalf Of
> lucabe...@libero.it
> Sent: Tuesday, October 11, 2011 8:49 AM
> To: pyqt@riverbankcomputing.com
> 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    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to