Skip to content

Commit 33bb79f

Browse files
authored
Merge pull request #2 from GPLgithub/13673_pyside6_py311_2
Changed things to leverage TK wrappers when possible.
2 parents 8b7a9e3 + ed2575f commit 33bb79f

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ Then the following files (or similar) need to be modified to add the Unreal inte
6666

6767

6868
## See also:
69-
For more information on how to run the ShotGrid/Unreal integration, please see the [support documentation](https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/UsingUnrealEnginewithAutodeskShotGrid).
69+
For more information on how to run the ShotGrid/Unreal integration, please see the [support documentation](https://docs.unrealengine.com/5.0/en-US/using-unreal-engine-with-autodesk-shotgrid/).
7070

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)