ListEdit#
Available in backends:
Signals#
changed(object)
- Emitted when the widget value changes.label_changed(str)
- Emitted when the widget label changes.native_parent_changed(object)
- Emitted with the backend widget when the widget parent changes.
ListEdit
#
Bases: ValuedContainerWidget[list[_V]]
A widget to represent a list of values.
A ListEdit container can create a list with multiple objects of same type. It will contain many child widgets and their value is represented as a Python list object. If a list is given as the initial value, types of child widgets are determined from the contents. Number of contents can be adjusted with +/- buttons.
Parameters:
-
value
(Iterable
, default:Undefined
) –The starting value for the widget.
-
nullable
(bool
) –If
True
, the widget will acceptsNone
as a valid value, by defaultFalse
. -
options
(dict
, default:None
) –Widget options of child widgets.
annotation: Any
property
writable
#
Return type annotation for the parameter represented by the widget.
ForwardRefs will be resolve when setting the annotation. For ListEdit, annotation will be like 'list[str]'.
data: ListDataView[_V]
property
writable
#
Return a data view of current value.
__delitem__(key: int | slice) -> None
#
Delete child widget(s).
get_value() -> list[_V]
#
Return current value as a list object.