[PyQt] Segfault in toPyObject with QVariant and QObject (4.5.4)

Florian Reinhard florian.reinhard at googlemail.com
Tue Sep 15 16:57:44 BST 2009

This testcase causes a segfault in 4.5.4 works in 4.4.4

from PyQt4.QtCore import QVariant, QObject

class Test (QObject):
    def __init__ (self,parent=None):
        super(Test,self).__init__ (parent)
        self.foo = 'bar'

    def uuu (self):
        print self.foo

class Wrapper (QObject):
    def __init__ (self,parent=None):
        super(Wrapper,self).__init__ (parent)
        test = Test ()
        self.test = QVariant (test)

    def aaa (self):
        self.test.toPyObject ().uuu ()

foo = Wrapper ()

More information about the PyQt mailing list