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.

Ulli


----------------
import sys
from qt import *

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

       # 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()
   w.show()
   a.exec_loop()
----------------


_______________________________________________
PyKDE mailing list    [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to