Skip to main content
`Ctrl`+`K`

# Dock Area Module

class pyqtgraph.dockarea.DockArea(

  parent=None,
  temporary=False,
  home=None,

)
  addContainer(
    typ,
    obj,
  )

    Add a new container around obj

  addDock(
    dock=None,
    position='bottom',
    relativeTo=None,
    **kwds,
  )

    Adds a dock to this area.

    Arguments: |
    dock | The new Dock object to add. If None, then a new Dock will be created.
    position | ‘bottom’, ‘top’, ‘left’, ‘right’, ‘above’, or ‘below’
    relativeTo | If relativeTo is None, then the new Dock is added to fill an entire edge of the window. If relativeTo is another Dock, then the new Dock is placed adjacent to it (or in a tabbed configuration for ‘above’ and ‘below’).

    All extra keyword arguments are passed to Dock.__init__() if dock is None.

  floatDock(
    dock,
  )

    Removes dock from this DockArea and places it in a new window.

  moveDock(
    dock,
    position,
    neighbor,
  )

    Move an existing Dock to a new location.

  restoreState(
    state,
    missing='error',
    extra='bottom',
  )

    Restore Dock configuration as generated by saveState.

    This function does not create any Docks–it will only restore the arrangement of an existing set of Docks.

    By default, docks that are described in state but do not exist in the dock area will cause an exception to be raised. This behavior can be changed by setting missing to ‘ignore’ or ‘create’.

    Extra docks that are in the dockarea but that are not mentioned in state will be added to the bottom of the dockarea, unless otherwise specified by the extra argument.

  saveState()

    Return a serialized (storable) representation of the state of all Docks in this DockArea.

class pyqtgraph.dockarea.Dock(

  name,
  area=None,
  size=(10, 10),
  widget=None,
  hideTitle=False,
  autoOrientation=True,
  label=None,
  **kargs,

)
  addWidget(
    widget,
    row=None,
    col=0,
    rowspan=1,
    colspan=1,
  )

    Add a new widget to the interior of this Dock. Each Dock uses a QGridLayout to arrange widgets within.

  close()

    Remove this dock from the DockArea it lives inside.

  hideTitleBar()

    Hide the title bar for this Dock. This will prevent the Dock being moved by the user.

  raiseDock()

    If this Dock is stacked underneath others, raise it to the top.

  setOrientation(
    o='auto',
    force=False,
  )

    Sets the orientation of the title bar for this Dock. Must be one of ‘auto’, ‘horizontal’, or ‘vertical’. By default (‘auto’), the orientation is determined based on the aspect ratio of the Dock.

  setStretch(
    x=None,
    y=None,
  )

    Set the ‘target’ size for this Dock. The actual size will be determined by comparing this Dock’s stretch value to the rest of the docks it shares space with.

  setTitle(text)

    Sets the text displayed in title bar for this Dock.

  showTitleBar()

    Show the title bar for this Dock.

  title()

    Gets the text displayed in the title bar for this dock.