Skip to content

Commit 18f39fd

Browse files
authored
Merge pull request #12 from GPLgithub/master
Support for PySide 6
2 parents 52f533a + 33bb79f commit 18f39fd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

engine.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,14 @@ def init_engine(self):
106106

107107
def init_qt_app(self):
108108
self.logger.debug("%s: Initializing QtApp for Unreal", self)
109-
from sgtk.platform.qt5 import QtWidgets
110109

111-
if not QtWidgets.QApplication.instance():
112-
self._qt_app = QtWidgets.QApplication(sys.argv)
110+
from sgtk.platform.qt import QtGui
111+
112+
if not QtGui.QApplication.instance():
113+
self._qt_app = QtGui.QApplication(sys.argv)
113114
self._qt_app.setQuitOnLastWindowClosed(False)
114115
else:
115-
self._qt_app = QtWidgets.QApplication.instance()
116+
self._qt_app = QtGui.QApplication.instance()
116117

117118
# On other platforms than Windows, we need to process the Qt events otherwise
118119
# UIs are "frozen". We use a slate tick callback to do that on a regular basis.
@@ -131,8 +132,8 @@ def _process_qt_events_cb(delta_time):
131132
132133
:param float delta_time: delta time since the last run.
133134
"""
134-
from sgtk.platform.qt5 import QtWidgets
135-
qapp = QtWidgets.QApplication.instance()
135+
from sgtk.platform.qt import QtGui
136+
qapp = QtGui.QApplication.instance()
136137
if qapp:
137138
qapp.processEvents()
138139

0 commit comments

Comments
 (0)