Collapsible Dock Widget (dock)

Collapsible Dock Widget

A dock widget that can be a collapsed/expanded.

class orangecanvas.gui.dock.CollapsibleDockWidget(*args: Any, **kwargs: Any)[source]

Bases: QDockWidget

This QDockWidget subclass overrides the close header button to instead collapse to a smaller size. The contents to show when in each state can be set using the setExpandedWidget() and setCollapsedWidget().

Note

Do not use the base class QDockWidget.setWidget() method to set the dock contents. Use setExpandedWidget() and setCollapsedWidget() instead.

expandedChanged

Emitted when the dock widget’s expanded state changes.

setExpanded(state: bool) None[source]

Set the widgets expanded state.

expanded() bool[source]

Is the dock widget in expanded state. If True the expandedWidget will be shown, and collapsedWidget otherwise.

expanded_

Is the dock widget in expanded state. If True the expandedWidget will be shown, and collapsedWidget otherwise.

setExpandedWidget(widget: QWidget) None[source]

Set the widget with contents to show while expanded.

expandedWidget() QWidget | None[source]

Return the widget previously set with setExpandedWidget, or None if no widget has been set.

setCollapsedWidget(widget: QWidget) None[source]

Set the widget with contents to show while collapsed.

collapsedWidget() QWidget | None[source]

Return the widget previously set with setCollapsedWidget, or None if no widget has been set.

currentWidget() QWidget | None[source]

Return the current shown widget depending on the expanded state

expand() None[source]

Expand the dock (same as setExpanded(True))

collapse() None[source]

Collapse the dock (same as setExpanded(False))

eventFilter(obj: QObject, event: QEvent) bool[source]

Reimplemented.

event(event: QEvent) bool[source]

Reimplemented.