[PyKDE] Segmentation fault with the latest SIP snapshots

Ulrich Berning ulrich.berning at desys.de
Thu Jun 30 14:10:04 BST 2005

Using QTimer.singleShot() causes a segmentation fault with 
sip-snapshot-20050626 and sip-snapshot-20050629.
With sip-snapshot-20050623, it worked. See the example code below.


import sys
from qt import *

class MyWidget(QWidget):
    def __init__(self,parent=None,name="",fl=0):

        # This works with
        # sip-snapshot-20050623
        # With sip-snapshot-20050626 or
        # sip-snapshot-20050629 it fails
        # with a segmentation fault
        QTimer.singleShot(500, self.single)

        # This works
        QTimer.singleShot(2000, qApp, SLOT("quit()"))

        # This works
        t = QTimer(self)
        self.connect(t, SIGNAL("timeout()"), self.repeated)
        t.start(100, False)
    def single(self):
        print "singleShot()"

    def repeated(self):       
        print "repeatedShot()"

if __name__ == "__main__":
    a = QApplication(sys.argv)
    QObject.connect(a, SIGNAL("lastWindowClosed()"),
                    a, SLOT("quit()"))
    w = MyWidget()

More information about the PyQt mailing list