Skip to content

TupleEdit#

TupleEdit widget

Available in backends:

Signals#

  • changed(object) - Emitted with self 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.

TupleEdit #

Bases: Container[ValueWidget]

A widget to represent a tuple of values.

A TupleEdit container has several child widgets of different type. Their value is
represented as a Python tuple object. If a tuple is given as the initial value,
types of child widgets are determined one by one. Unlike ListEdit, number of
contents is not editable.

Parameters:

  • value (Iterable, default: Undefined ) –

    The starting value for the widget.

  • nullable (bool, default: False ) –

    If True, the widget will accepts None as a valid value, by default False.

  • 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 TupleEdit, annotation will be like 'tuple[str, int]'.

value: tuple property writable #

Return current value as a tuple.