diff --git a/qtribu/logic/web_viewer.py b/qtribu/logic/web_viewer.py index d5b8e5ee..29f8bd7d 100644 --- a/qtribu/logic/web_viewer.py +++ b/qtribu/logic/web_viewer.py @@ -15,7 +15,13 @@ # PyQGIS from qgis.PyQt.QtCore import QCoreApplication, Qt from qgis.PyQt.QtGui import QDesktopServices -from qgis.PyQt.QtWebKitWidgets import QWebView + +try: + from qgis.PyQt.QtWebKitWidgets import QWebView +except: + QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts) + from PyQt.QtWebEngineWidgets import QWebEngineView as QWebView + from qgis.PyQt.QtWidgets import QVBoxLayout, QWidget # project