[PyKDE] Looping over QLabels

GuineaPig guineapig at pi.be
Tue Mar 23 15:08:00 GMT 2004


Hello,

In my application I have a QDialog with a lot of QLabels.  From time to 
time these labels need to be cleared (text set to '').  Is there a way 
to iterate over the labels ?
I'm looking for something like this:

for QLabel in self....
  QLabel.setText('')

Instead of having to do this:

QLabel1.setText('')
QLabel2.setText('')
QLabel3.setText('')
...

Tnx,

Tom




More information about the PyQt mailing list