Files
MINGW-packages/mingw-w64-python-qtpy/001-restore-qtwebkit-support.patch
مهدي شينون (Mehdi Chinoune) 53f4998d74 qtpy: restore qtwebkit support
2022-09-16 18:35:54 +01:00

19 lines
740 B
Diff

--- a/qtpy/QtWebEngineWidgets.py
+++ b/qtpy/QtWebEngineWidgets.py
@@ -33,10 +33,11 @@
# Based on the work at https://github.com/spyder-ide/qtpy/pull/203
from PyQt5.QtWebEngineWidgets import QWebEngineProfile
- except ModuleNotFoundError as error:
- raise QtModuleNotInstalledError(
- name='QtWebEngineWidgets', missing_package='PyQtWebEngine'
- ) from error
+ except ImportError:
+ from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
+ from PyQt5.QtWebKitWidgets import QWebView as QWebEngineView
+ from PyQt5.QtWebKit import QWebSettings as QWebEngineSettings
+ WEBENGINE = False
elif PYQT6:
try:
from PyQt6.QtWebEngineWidgets import *