Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ Then the following files (or similar) need to be modified to add the Unreal inte


## See also:
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).
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/).

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