Skip to content

Commit

Permalink
Only apply fix to Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Mar 1, 2024
1 parent a9d70c8 commit 756fd34
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 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, QtQuick
from qtpy import QtCore, QtGui, QtWidgets, QtQuick, QT6

from glue.config import settings
from glue._settings_helpers import save_settings
Expand Down Expand Up @@ -50,7 +50,8 @@ def get_qapp(icon_path=None):
# 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)
if QT6:
QtQuick.QQuickWindow.setGraphicsApi(QtQuick.QSGRendererInterface.GraphicsApi.OpenGL)

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

0 comments on commit 756fd34

Please sign in to comment.