1

I built a form for my vector layer using the Drag'n'drop form designer but I only did so for some of the layers fields.

Is it possible to automatically add widgets for the other fields to the form, e.g. in a separate tab without writing custom Python init code? For example for a text field a text input (~QLineEdit), for a integer input an integer numeric input (~QSpinBox). If so, how?

E.g. if my layer has the fields:

  • foo
  • bar
  • baz

and I used drag'n'drop to add the following fields to my form:

  • foo
  • bar

I would like to have QGIS automatically use its default widget magic for the remaining field:

  • baz

1 Answer 1

1

If by "default widget magic" you mean using a default value expression, this does still work even if a field isn't added to the form via drag and drop designer.

1
  • I mean an appropriate widget in the form for the user to see and edit the attributes' values with. Commented Dec 23, 2023 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.