Skip to content

Commit

Permalink
Merge pull request #186 from lbartoletti/fix_QWebView
Browse files Browse the repository at this point in the history
fix(web_viewer): switch from QtWebKit to QtWebEngine
  • Loading branch information
Guts authored Aug 1, 2024
2 parents ff68e01 + cef3659 commit d143a74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion qtribu/logic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
from .custom_datatypes import RssItem # noqa: F401
from .rss_reader import RssMiniReader # noqa: F401
from .splash_changer import SplashChanger # noqa: F401
from .web_viewer import WebViewer # noqa: F401
9 changes: 4 additions & 5 deletions qtribu/logic/web_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
# PyQGIS
from qgis.PyQt.QtCore import QCoreApplication, Qt
from qgis.PyQt.QtGui import QDesktopServices
from qgis.PyQt.QtWidgets import QVBoxLayout, QWidget

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
from qgis.PyQt.QtWebEngineWidgets import QWebEngineView as QWebView
except Exception:
from qgis.PyQt.QtWebKitWidgets import QWebView

# project
from qtribu.toolbelt import NetworkRequestsManager, PlgLogger, PlgOptionsManager
Expand Down
2 changes: 1 addition & 1 deletion qtribu/toolbelt/commons.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from qgis.PyQt.QtCore import QUrl
from qgis.PyQt.QtGui import QDesktopServices

from qtribu.logic import WebViewer
from qtribu.logic.web_viewer import WebViewer

web_viewer = WebViewer()

Expand Down

0 comments on commit d143a74

Please sign in to comment.