1
0

QT: Stop timer cleanly to avoid exceptions on exit

This commit is contained in:
Neil Booth
2015-12-20 16:15:33 +09:00
parent e1c0298fc2
commit 2226667437
2 changed files with 9 additions and 1 deletions

View File

@@ -245,6 +245,9 @@ class ElectrumGui:
# main loop
self.app.exec_()
# Shut down the timer cleanly
self.timer.stop()
# clipboard persistence. see http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg17328.html
event = QtCore.QEvent(QtCore.QEvent.Clipboard)
self.app.sendEvent(self.app.clipboard(), event)