def _get_dialog_parent(self):
"""
Get the QWidget parent for all dialogs created through
show_dialog & show_modal.
"""
"""
Get the QWidget parent for all dialogs created through
show_dialog & show_modal.
"""
# determine the parent widget to use:
from tank.platform.qt import QtGui, QtCore
if not self._DIALOG_PARENT:
if sys.platform == "win32":
# for windows, we create a proxy window parented to the
# main application window that we can then set as the owner
# for all Toolkit dialogs
self._DIALOG_PARENT = self._win32_get_proxy_window()
else:
self._DIALOG_PARENT = QtGui.QApplication.activeWindow()
return self._DIALOG_PARENT
评论列表
文章目录