Skip to content

Support for PySide 6 #12

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

Merged
merged 3 commits into from
May 25, 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
13 changes: 7 additions & 6 deletions engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ def init_engine(self):

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

if not QtWidgets.QApplication.instance():
self._qt_app = QtWidgets.QApplication(sys.argv)
from sgtk.platform.qt import QtGui

if not QtGui.QApplication.instance():
self._qt_app = QtGui.QApplication(sys.argv)
self._qt_app.setQuitOnLastWindowClosed(False)
else:
self._qt_app = QtWidgets.QApplication.instance()
self._qt_app = QtGui.QApplication.instance()

# On other platforms than Windows, we need to process the Qt events otherwise
# UIs are "frozen". We use a slate tick callback to do that on a regular basis.
Expand All @@ -131,8 +132,8 @@ def _process_qt_events_cb(delta_time):

:param float delta_time: delta time since the last run.
"""
from sgtk.platform.qt5 import QtWidgets
qapp = QtWidgets.QApplication.instance()
from sgtk.platform.qt import QtGui
qapp = QtGui.QApplication.instance()
if qapp:
qapp.processEvents()

Expand Down