From be43632cc47eb8cc35c2a39a21bc2089e5ce8ca1 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 3 Apr 2021 06:17:47 +0200 Subject: [PATCH] qt init: more clean-up for system tray related: https://github.com/spesmilo/electrum/issues/6889#issuecomment-812776695 --- electrum/gui/qt/__init__.py | 2 ++ electrum/gui/qt/main_window.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index aeda87966..2316e5c22 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -392,6 +392,8 @@ class ElectrumGui(Logger): self.app.sendEvent(self.app.clipboard(), event) if self.tray: self.tray.hide() + self.tray.deleteLater() + self.tray = None self.app.aboutToQuit.connect(clean_up) # main loop diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 01575043c..37aede244 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -3184,6 +3184,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): if self._update_check_thread: self._update_check_thread.exit() self._update_check_thread.wait() + if self.tray: + self.tray = None self.gui_object.timer.timeout.disconnect(self.timer_actions) self.gui_object.close_window(self)