*** GMX Spamverdacht *** [PyQt] Iterating over the contents of QGroupBox

Andreas Pakulat apaku at gmx.de
Tue Mar 13 08:43:46 GMT 2007


On 13.03.07 00:40:21, Tony Cappellini wrote:
> My form was created in QDesigner.
> 
> I've got several checkboxes (and one spin box) inside of a QGroupBox.
> I'd like to iterate over the contents of the groupbox, but don't know
> how to do it?
> Is it possible to get an iterator over the group box contents?

Well, all of these are childs of the QGroupBox, so you can use QObjects
methods to get the childs and iterate over those. Be aware that this
list may contain childs other than the ones you expect it to be.

Another approach would be to make the checkboxes member variables of
"self" when creating them.

Andreas

-- 
You will be awarded a medal for disregarding safety in saving someone.


More information about the PyQt mailing list