In Attribute Table, there is a form view instead of the table view and the label of listing on the left side can be customized using preview expression. So the user will notice a friendly and meaningful listing. I can customize it manually but I'm creating an automation plugin to load and configure from my datasets.
I observed, it gets stored as <previewExpression>
of the layer in the .qgs
file. However I don't see any related methods in QgsVectorLayer
python class.
How can I customize the preview expression in Python?