Skip to content

Commit

Permalink
Merge pull request #14 from GPLgithub/master
Browse files Browse the repository at this point in the history
For #13673, fixed QT problems
  • Loading branch information
ryanmayeda authored Aug 3, 2024
2 parents 192fed9 + 7f039a9 commit 0b65686
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/tk_unreal/unreal_sg_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _execute_deferred(self, callback):
unreal.log("{0} _execute_deferred called with {1}".format(self, callback.__str__()))
self._callback = callback

from sgtk.platform.qt5 import QtCore
from sgtk.platform.qt import QtCore
QtCore.QTimer.singleShot(0, self._execute_within_exception_trap)

def _execute_within_exception_trap(self):
Expand All @@ -224,16 +224,16 @@ def _execute_within_exception_trap(self):

@unreal.ufunction(override=True)
def shutdown(self):
from sgtk.platform.qt5 import QtWidgets
from sgtk.platform.qt import QtGui

engine = sgtk.platform.current_engine()
if engine is not None:
unreal.log("Shutting down %s" % self.__class__.__name__)

# destroy_engine of tk-unreal will take care of closing all dialogs that are still opened
engine.destroy()
QtWidgets.QApplication.instance().quit()
QtWidgets.QApplication.processEvents()
QtGui.QApplication.instance().quit()
QtGui.QApplication.processEvents()

@staticmethod
def object_path(asset_data):
Expand Down Expand Up @@ -366,7 +366,7 @@ def _jump_to_sg(self):
"""
Callback to Jump to SG from context.
"""
from sgtk.platform.qt5 import QtGui, QtCore
from sgtk.platform.qt import QtGui, QtCore
url = self._get_context_url(sgtk.platform.current_engine())
QtGui.QDesktopServices.openUrl(QtCore.QUrl(url))

Expand Down

0 comments on commit 0b65686

Please sign in to comment.