build_attrs_class_editor

caqtus.gui.autogen.build_attrs_class_editor(
cls: type[T],
builder: EditorBuilder,
**attr_overrides: AttributeOverride,
) EditorFactory

Build an editor for attrs class.

This function will build a form editor with a list of widgets for the attributes of the class.

The label for each widget is the name of the attribute, prettified by removing underscores and capitalizing the first letter of the first word.

Parameters:
  • cls – The attrs class to build the editor for.

  • builder – The editor builder used to build editors for the class attributes.

  • **attr_overrides – If a named argument corresponds to one of the attributes, the object passed as argument will override the automated ui generation for that attribute.