views:

115

answers:

1

I wrote PyQt application. After it's start I close it (GUI), but timer don't stops and Python sometimes freezes. Only thing to unfreeze it - Ctrl-C, after which following message appears:

Traceback (most recent call last): File "", line 262, in timerEvent KeyboardInterrupt

timer don't stops again, and CPython works very slowly. How to avoid this problem?

EDIT: I added killTimer() to source but things don't changed that much. CPython is slow and hangs sometimes. How to fully destroy all PyQt objects?

Mw = TMainWindow()
TimerId = Mw.startTimer(25)
QApp.exec_()
Mw.killTimer(TimerId)
A: 

Without further information this is a complete guess. One of the more frequent reasons that an application doesn't exit when the GUI is closed is because of QApplication::quitOnLastWindowClosed property being set to false.

Kaleb Pederson
This doesn't work unfortunately.
DSblizzard