[QGIS-Developer] Has QgsLayout.itemById() changed?

Alessandro Pasotti apasotti at gmail.com
Fri Sep 21 06:32:37 PDT 2018


Hi Raymond,

confirmed, there is probably something broken in the bindings, please file
a ticket.

On Fri, Sep 21, 2018 at 3:20 PM Raymond Nijssen <r.nijssen at terglobo.nl>
wrote:

> 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
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180921/1cd95fac/attachment.html>


More information about the QGIS-Developer mailing list