Running this python script (in qgis 3.3):

p = QgsProject.instance()
lom = p.layoutManager()
lo = lom.layoutByName('a4')
item = lo.itemById('label_title')
print(item)


a few weeks ago, it outputed this:
<qgis._core.QgsLayoutItemLabel object at 0x7fe90b6d0318>


but today it outputs:
<qgis._core.QgsLayoutItem object at 0x7fe90b6d0318>



My next line is:

item.setText('hello')

which doesn't work anymore, because there is no setText() function on a QgsLayoutItem. Has anything changed recently? Does any one know a solution?

Regards,
Raymond
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to