[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] get list of object
From:       "Paul Du Bois" <dubois () doublefine ! com>
Date:       2011-10-11 18:08:17
Message-ID: A1693E7EC0F6AB40BF00BF17BAE9AC8909FC8E63 () CLEM ! doublefine ! com
[Download RAW message or body]

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

> -----Original Message-----
> From: pyqt-bounces@riverbankcomputing.com [mailto:pyqt-bounces@riverbankcomputing.com] On Behalf Of
> lucaberto@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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic