spark.graph_editor.widgets.collapsible#
Classes#
A collapsible widget to hide and unhide child widgets. |
Module Contents#
- class spark.graph_editor.widgets.collapsible.QCollapsible(title='', expandedIcon='▼', collapsedIcon='▲')[source]#
Bases:
PySide6.QtWidgets.QFrameA collapsible widget to hide and unhide child widgets. A signal is emitted when the widget is expanded (True) or collapsed (False).
- Parameters:
- setContent(content)[source]#
Replace central widget (the widget that gets expanded/collapsed).
- Parameters:
content (PySide6.QtWidgets.QWidget)
- Return type:
None
- expandedIcon()[source]#
Returns the icon used when the widget is expanded.
- Return type:
PySide6.QtGui.QIcon
- setExpandedIcon(icon=None)[source]#
Set the icon on the toggle button when the widget is expanded.
- Parameters:
icon (PySide6.QtGui.QIcon | str | None)
- Return type:
None
- collapsedIcon()[source]#
Returns the icon used when the widget is collapsed.
- Return type:
PySide6.QtGui.QIcon
- setCollapsedIcon(icon=None)[source]#
Set the icon on the toggle button when the widget is collapsed.
- Parameters:
icon (PySide6.QtGui.QIcon | str | None)
- Return type:
None
- setDuration(msecs)[source]#
Set duration of the collapse/expand animation.
- Parameters:
msecs (int)
- Return type:
None
- setEasingCurve(easing)[source]#
Set the easing curve for the collapse/expand animation.
- Parameters:
easing (PySide6.QtCore.QEasingCurve | PySide6.QtCore.QEasingCurve.Type)
- Return type:
None
- addWidget(widget)[source]#
Add a widget to the central content widget’s layout.
- Parameters:
widget (PySide6.QtWidgets.QWidget)
- Return type:
None
- removeWidget(widget)[source]#
Remove widget from the central content widget’s layout.
- Parameters:
widget (PySide6.QtWidgets.QWidget)
- Return type:
None
- expand(animate=True)[source]#
Expand (show) the collapsible section.
- Parameters:
animate (bool)
- Return type:
None
- collapse(animate=True)[source]#
Collapse (hide) the collapsible section.
- Parameters:
animate (bool)
- Return type:
None