Skip to content

propertywidget

T module-attribute

T = TypeVar('T')

PropertyWidget

Bases: QWidget, QObject

Widget for displaying property items.

label instance-attribute

label = create_widget(QLabel, text=name)

name instance-attribute

name = name

valueChanged class-attribute

valueChanged: SignalInstance = Signal(float)

valueSpinBox instance-attribute

valueSpinBox = create_widget(SpinBox, value=value)

__init__

__init__(
    name: str,
    value: float,
    enabled: bool = None,
    parent=None,
    *args,
    SpinBox: Type[QDoubleSpinBox] = QDoubleSpinBox,
    **kwargs
)

Initialize the PropertyWidget.

isEnabled

isEnabled() -> bool

Get whether the PropertyWidget is enabled.

setOptions

setOptions(
    *,
    decimals: int | None = None,
    maximum: float | None = None,
    minimum: float | None = None,
    prefix: str | None = None,
    singleStep: float | None = None,
    stepType: StepType | None = None,
    suffix: str | None = None,
    **options
)

Set the options of the PropertyWidget.

setValue

setValue(value: float)

Set the value of the PropertyWidget.

value

value() -> float

Get the value of the PropertyWidget.

create_widget

create_widget(
    cls: Type[T], init_args: tuple = None, init_kwargs: dict = None, **kwargs
) -> T