Skip to content

Commit

Permalink
Added fix for using WebEngine and OpenGL in same glue session with Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Mar 1, 2024
1 parent 0bb6ec4 commit a9d70c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion glue_qt/utils/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
import platform
from qtpy import QtCore, QtGui, QtWidgets
from qtpy import QtCore, QtGui, QtWidgets, QtQuick

from glue.config import settings
from glue._settings_helpers import save_settings
Expand Down Expand Up @@ -47,6 +47,11 @@ def get_qapp(icon_path=None):
# don't do it here and instead ask that the plugins do it in their
# main __init__.py (which should get executed before glue is launched).

# NOTE: the following setting is needed to make sure we can use
# WebEngine at the same time as the OpenGL widget, at least on MacOS X.
# See https://bugreports.qt.io/browse/QTBUG-122886 for more details.
QtQuick.QQuickWindow.setGraphicsApi(QtQuick.QSGRendererInterface.GraphicsApi.OpenGL)

qapp = QtWidgets.QApplication([''])
qapp.setQuitOnLastWindowClosed(True)

Expand Down

0 comments on commit a9d70c8

Please sign in to comment.