CollapsibleWidget¶
-
class
cgp_generic_utils.qt.CollapsibleWidget(title, titleHeight, backgroundColor=None, foregroundColor=None, orientation=None, margins=None, spacing=0, isCollapsed=True, parent=None)¶ Bases:
PySide2.QtWidgets.QWidgetwidget that allows to hide/show its content by collapsing/expanding
-
addLayout(layout)¶ add layout to the CollapsibleWidget
Parameters: layout ( PySide2.QtWidgets.QLayout) – layout to add to the CollapsibleWidget
-
addWidget(widget)¶ add widget to the CollapsibleWidget
Parameters: widget ( PySide2.QtWidgets.QWidget) – widget to add to the CollapsibleWidget
-
collapse()¶ collapse the content of the CollapsibleWidget
-
collapseChanged= 'PySide2.QtCore.Signal(bool)'¶
-
contentWidget()¶ get the content widget
Returns: the content widget Return type: PySide2.QtWidgets.QWidget
-
expand()¶ expand the content of the CollapsibleWidget
-
isCollapsed()¶ get the collapsed state of the CollapsibleWidget
Returns: the collapsed state Return type: bool
-
toggleCollapse()¶ toggle collapse state of the CollapsibleWidget
-