From ec78c25829f867cfc9c896c8f0cd50974b4da272 Mon Sep 17 00:00:00 2001 From: leha-code Date: Wed, 23 Mar 2022 08:59:16 -0400 Subject: [PATCH] Transition to QtPy --- planet/main.py | 12 ++++++------ requirements.txt | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/planet/main.py b/planet/main.py index ac64252..2b63aeb 100644 --- a/planet/main.py +++ b/planet/main.py @@ -51,11 +51,11 @@ import launcher from splashes import SPLASHES # PyQt5 imports -from PyQt5.QtCore import * -from PyQt5.QtWidgets import * -from PyQt5.QtGui import * -from PyQt5.QtWebKit import * -from PyQt5.QtWebKitWidgets import * +from qtpy.QtCore import * +from qtpy.QtWidgets import * +from qtpy.QtGui import * +from qtpy.QtWebEngine import * +from qtpy.QtWebEngineWidgets import * # Additional imports import qdarktheme # Dark style for PyQt5 @@ -498,7 +498,7 @@ class Planet(QMainWindow): return widget def changelog_tab(self): - web = QWebView() # Create a webview object + web = QWebEngineView() # Create a webview object web.load(QUrl().fromLocalFile(f"{absolute_path}/assets/changelog.html")) # Load the local file # TODO: Use two different tabs for the webview diff --git a/requirements.txt b/requirements.txt index 89c5fd0..accf8d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -pyqt5 +qtpy pyqtdarktheme pypresence pillow