From c35dfa2223c6f042ef04df732e05438b952b39ec Mon Sep 17 00:00:00 2001 From: RemixDev Date: Sat, 22 Aug 2020 11:47:12 +0200 Subject: [PATCH] Fixed WebEnginePage still not deleted error --- deemix-pyweb.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/deemix-pyweb.py b/deemix-pyweb.py index 682a48b..0be7ad1 100644 --- a/deemix-pyweb.py +++ b/deemix-pyweb.py @@ -21,7 +21,6 @@ server_lock = Lock() class LoginWindow(QDialog): class CustomPage(QWebEnginePage): - def acceptNavigationRequest(self, url, type, main): if url.toString() == "https://www.deezer.com/": url = QUrl('https://www.deezer.com/ajax/gw-light.php?method=user.getArl&input=3&api_version=1.0&api_token=null') @@ -29,7 +28,6 @@ class LoginWindow(QDialog): return False return super().acceptNavigationRequest(url, type, main) - def __init__(self, parent): super().__init__(parent) self.webview = QWebEngineView() @@ -57,8 +55,6 @@ class LoginWindow(QDialog): if body.startswith("{"): self.arl = json.loads(body)['results'] self.accept() - self.page = None - self.webview = None class MainWindow(QMainWindow): selectDownloadFolder_trigger = pyqtSignal() @@ -122,6 +118,8 @@ class MainWindow(QMainWindow): loginWindow = LoginWindow(self) self.arl = loginWindow.arl self._appLogin_semaphore.release() + loginWindow.page.deleteLater() + loginWindow.webview.deleteLater() loginWindow.deleteLater() def closeEvent(self, event):