Skip to content

Commit

Permalink
Using tuple() syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Yu committed Apr 30, 2021
1 parent 4e5e488 commit 6de264e
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions python/tank/platform/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1835,9 +1835,7 @@ def show_dialog(self, title, bundle, widget_class, *args, **kwargs):
The dialog will be created with a standard Toolkit window title bar where
the title will be displayed.
.. seealso::
- :ref:`qdialog-exit-codes`
- :ref:`hiding-toolkit-title-bar`
.. seealso:: :ref:`hiding-toolkit-title-bar`
**Notes for engine developers**
Expand Down Expand Up @@ -1907,7 +1905,9 @@ def show_modal(self, title, bundle, widget_class, *args, **kwargs):
the title will be displayed.
.. seealso::
- :ref:`qdialog-exit-codes`
- :ref:`hiding-toolkit-title-bar`
:param title: The title of the window
Expand All @@ -1918,10 +1918,9 @@ def show_modal(self, title, bundle, widget_class, *args, **kwargs):
Additional parameters specified will be passed through to the
``widget_class`` constructor.
:returns: Tuple of :attr:`QDialog.DialogCode
<PySide.QtGui.PySide.QtGui.QDialog.DialogCode>` and and the created
``widget_class`` instance
:rtype: (:class:`int`, :class:`PySide.QtGui.QWidget`)
:returns: :attr:`QDialog.DialogCode <PySide.QtGui.PySide.QtGui.QDialog.DialogCode>`
and the created ``widget_class`` instance
:rtype: tuple(int, PySide.QtGui.QWidget)
"""
if not self.has_ui:
self.log_error(
Expand Down Expand Up @@ -1954,24 +1953,19 @@ def show_panel(self, panel_id, title, bundle, widget_class, *args, **kwargs):
The dialog will be created with a standard Toolkit window title bar where
the title will be displayed.
.. note:: In some cases, it is necessary to hide the standard Toolkit title
bar. You can do this by adding a property to the widget class you are
displaying::
@property
def hide_tk_title_bar(self):
"Tell the system to not show the standard toolkit toolbar"
return True
.. seealso:: :ref:`hiding-toolkit-title-bar`
:param panel_id: Unique identifier for the panel, as obtained by register_panel().
:param title: The title of the panel
:param bundle: The app, engine or framework object that is associated with this window
:param widget_class: The class of the UI to be constructed. This must derive from QWidget.
:type widget_class: :class:`PySide.QtGui.QWidget`
Additional parameters specified will be passed through to the widget_class constructor.
Additional parameters specified will be passed through to the
``widget_class`` constructor.
:returns: the created widget_class instance
:returns: The created ``widget_class`` instance
:rtype: PySide.QtGui.QWidget
"""
# engines implementing panel support should subclass this method.
# the core implementation falls back on a modeless window.
Expand Down

0 comments on commit 6de264e

Please sign in to comment.