Good day
I am wishing to create a value in a field on a composer layout that
reads the value of another field on the layout and calculates a value to
be displayed.
For example, I have an existing field called Filename on the layout and
in a python script running in the main window console, I have this code
that reads the value of the Filename field as follows:
layoutTitle = "Landscape 16:9 Header Nav Copyright Filename 2021"
project = QgsProject.instance()
projectLayoutManager = project.layoutManager()
layout = projectLayoutManager.layoutByName(layoutTitle)
fileNameLabel = layout.itemById('Filename')
fileNameText = fileNameLabel.text()
Obviously I am hoping that doing this from a field within the layout
that reads another field on the same layout will be much simpler than
the above. How exactly would I achieve that?
Thanks in advance.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user