ListEdit#
Available in backends:
Signals#
changed(object)
- Emitted withself
when any sub-widget in the container 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: Container[ValueWidget[_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
, default:False
) –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.
value: list[_V]
property
writable
#
Return current value as a list object.
__delitem__(key: int | slice) -> None
#
Delete child widget(s).