MINGW-packages/mingw-w64-python-qtpy/001-restore-qtwebkit-support.patch
2023-09-06 19:55:46 +01:00

20 lines
682 B
Diff

--- a/qtpy/QtWebEngineWidgets.py
+++ b/qtpy/QtWebEngineWidgets.py
@@ -32,11 +32,11 @@
QWebEngineSettings,
QWebEngineView,
)
- 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.QtWebEngineCore import (