1

I am using QGIS 3.32 to set the field alias:

layer = iface.activeLayer()
layer.setFieldAlias(0, 'this is field')

I want the field aliases to show in the feature form only, not in the attribute table. How to acheive this using PyQGIS?

1 Answer 1

0

There are 3 ways to create feature form:

  1. automaticaly generated form
  2. user defined "drag'n'drop" form
  3. user defined *.ui form

With 1st and 2nd methods, the field headers in the table and form are the same

With the 3rd method you can set field title manually or with code

Relevant for older versions of QGIS. Maybe there are some new options in 3.32.

1
  • From drag and drop, I wanted to add html widget/ Text widget using pyqgis. Is it possible Commented Aug 8, 2023 at 6:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.