[PyKDE] QObject.inherits and queryList (still broken in 4.2?)

Phil Thompson phil at riverbankcomputing.co.uk
Fri Feb 25 09:15:00 GMT 2005


> Hello,
>
> a few days ago I posted a bugreport about the QObject.inherits() not
> working
> as expected with SIP/PyQT:
> http://www.mail-archive.com/pykde@mats.imk.fraunhofer.de/msg04211.html
>
> This seems fixed with SIP 4.2 and PyQT 3.14, but sadly queryList() still
> appears to be broken.
>
>>>> from qt import *
>>>> app = QApplication([])
>>>> w = QWidget()
>>>> class Foo(QWidget):
> ...     pass
> ...
>>>> f = Foo(w)
>>>> f.className()
> 'Foo'
>>>> f.isA("Foo")
> True
>>>> f.inherits("Foo")
> True
>>>> w.queryList()
> [<__main__.Foo object at 0x00813690>]
>>>> w.queryList("QWidget")
> [<__main__.Foo object at 0x00813690>]
>>>> w.queryList("Foo")
> []
>
> So, any clue about this?

It will be fixed in the next PyQt snapshot.

Phil




More information about the PyQt mailing list