19 lines
740 B
Diff
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 *
|