spacr.qt.widgets.section

Section — a collapsible group with a header row (chevron + title) and a QFormLayout body that expands/collapses on click. Used by settings screens to group related fields; every section is collapsed by default so users see one row per category instead of a wall of controls.

Module Contents

class spacr.qt.widgets.section.Section(title: str, parent=None, expanded: bool = False)[source]

Bases: PySide6.QtWidgets.QFrame

Collapsible section with an animated chevron header + form body.

toggled[source]
add_row(label: str, widget: PySide6.QtWidgets.QWidget) None[source]

Add a labeled row to the section’s form body.

add_widget(widget: PySide6.QtWidgets.QWidget) None[source]

Add a full-width (label-less) widget to the section’s form body.

title() str[source]

Return the section’s header text.

set_expanded(on: bool) None[source]

Expand or collapse the section body programmatically.

is_expanded() bool[source]

Return True when the section body is currently visible.