[PyKDE] Problem with layout iterators

Hans-Peter Jansen hpj at urpla.net
Sun Jul 10 12:32:03 BST 2005


Am Sonntag, 10. Juli 2005 12:20 schrieb Phil Thompson:
> >
> > Can this be fixed, so that only the correct sub-classes are
> > produced by the layout iterators, please?
>
> Ok, I've managed to extract enough type information to make this
> work. The following code...
>
> from qt import *
>
> a = QApplication([])
>
> d = QFileDialog()
> i = d.layout().iterator()
>
> c = i.current()
> while c:
>     print c
>     c = i.next()
>
> ...will generate the following output...
>
> <qt.QHBoxLayout object at 0x2aaaae656f58>
> <qt.QVBoxLayout object at 0x2aaaae6570d8>
> <qt.QHBoxLayout object at 0x2aaaae656f58>

Ahh, x64_64 arch, I suppose ;-)

> You will need tonight's PyQt snaphot built with tonight's SIP
> snapshot. (The SIP changes were needed to handle QLayout's multiple
> inheritance.)

Phil, you rock!

Pete




More information about the PyQt mailing list