From a50ace1b701bda392384d1e9d1fcfcef25a772ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=B3pez=20Barr=C3=B3n?= Date: Fri, 5 Jan 2024 19:17:23 +1100 Subject: [PATCH] import QtWebEngineWidgets from corresponding module --- grill/views/description.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grill/views/description.py b/grill/views/description.py index 470fa3de..4cb44adf 100644 --- a/grill/views/description.py +++ b/grill/views/description.py @@ -403,7 +403,11 @@ def __init__(self, *args, **kwargs): layout = QtWidgets.QVBoxLayout() # After some experiments, QWebEngineView brings nicer UX and speed than QGraphicsSvgItem and QSvgWidget if not _SVG_AS_PIXMAP: - from PySide6 import QtWebEngineWidgets + if QtWidgets.__package__ == "PySide6": + # PySide-6.6.0 and 6.6.1 freeze when QtWebEngineWidgets is imported on ._qt, so inlining here until fixed + from PySide6 import QtWebEngineWidgets + else: + from PySide2 import QtWebEngineWidgets self._graph_view = QtWebEngineWidgets.QWebEngineView(parent=self) self.urlChanged = self._graph_view.urlChanged else: