Hi,

We're trying to run our PyQt-based app with SIP 4.0rc1 (and as a consequence 
PyQt 3.9 and Python 2.3.3) and have isolated a crash bug when using 
QTimer.singleShot.

Attached is an example app that will crash when pressing the push button. We 
have only tested this under Windows XP. The Qt version is 3.2.1.

If this is a known bug that has been fixed in later snapshots I apologize, but 
I searched the archives for singleshot and drew a blank.

Best regards,
Fredrik Juhlin
import qt

class Test(qt.QObject):
    """
    """
    def __init__(self):
        """
        """
        qt.QObject.__init__(self)
        self._a = qt.QApplication([])
        self._w = qt.QMainWindow()
        self._b = qt.QPushButton('Start idle-timer', self._w)
        self._w.setCentralWidget(self._b)
        self.connect(self._b, qt.SIGNAL("clicked()"), self._cbTest)
        self._w.show()       
        self._a.exec_loop()
                
    def _cbTest(self):
        """
        """
        qt.QTimer.singleShot(0, self._cbIdleTimer)
        
    def _cbIdleTimer(self):
        """
        """
        print 'at idle'
        self._a.exit(0)
        
if __name__ == '__main__':
    Test()

Reply via email to