Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix for using WebEngine and OpenGL in same glue session with Qt6 #15

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 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, QT6

from glue.config import settings
from glue._settings_helpers import save_settings
Expand Down Expand Up @@ -47,6 +47,12 @@ 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.
if QT6:
QtQuick.QQuickWindow.setGraphicsApi(QtQuick.QSGRendererInterface.GraphicsApi.OpenGL)

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

Expand Down
Loading