I need to create a widget were some fields of a feature are listed and are editable.
I used QgsAttributeForm for this, but this widget is too big and has to many fields.
I need to provide a QCheckBox as well before every field to mark it as selected or deselected.
I took a look at the QgsFeature class and its fields() method. The QgsField class has a type() Method for determing the type of a field, but unfortunately I have not yet found an easy to create a widget from a field type.
I took a look at the QgsFieldWrapper classes, but they don't seem to work in PyQGIS because they are abstract classes.
Is there an easy way to create a default widget from a feature field, e.g. widget = FieldWidgetWrapper(field) that I can use to generate these controls?
I know I can create custom UIs for AttributeForms, but this will not work, because I need to be able to have more than one feature in this widget represented by specific fields.
Currently I display everything in LineEdits, but this is not working, especially for DateTime objects. It would be cool if the widgets can be created automatically from a field like in the QgsAttributeForm class...