[PyKDE] Problem with layout iterators

Phil Thompson phil at riverbankcomputing.co.uk
Sun Jul 10 14:36:50 BST 2005


On Sunday 10 July 2005 12:49 pm, Giovanni Bajo wrote:
> Phil Thompson <phil at riverbankcomputing.co.uk> wrote:
> >> Can't you pretend all those virtual functions are pure, so that
> >> they're invoked virtually? At least the iterator will work
> >> correctly, even if Python doesn't know its real type.
> >
> > The iterator works fine. The problem is working out the specific type
> > of the QLayoutItems it returns.
> >
> > Having looked at the implementation of QLayoutItem, QWidgetItem etc.
> > it looks like it will be possible to use QLayoutItem::widget() etc.
> > to determine a more specific type.
>
> What's your position on using C++ RTTI instead of Qt metaobject stuff,
> which is available only for QObject? Of course I'm thinking of PyQt4.

It can't be relied on.

Phil




More information about the PyQt mailing list