[QGIS-Developer] QGIS 3 itemById should return subclassed item

SIGéal sigeal at sigeal.com
Mon Feb 12 23:41:45 PST 2018


Thanks for your answers, it helps to workaround... waiting for an 
upstream fix.

-- 
Christophe

Le 13/02/2018 à 00:28, Chris Crook a écrit :
> Hi Nyall
>
> Thanks so much for the pointer (idea that is, not C++ pointer) .. I'll give it a go
>
> Cheers
> Chris
> ________________________________________
> From: QGIS-Developer [qgis-developer-bounces at lists.osgeo.org] on behalf of Nyall Dawson [nyall.dawson at gmail.com]
> Sent: 13 February 2018 10:36
> To: SIGéal
> Cc: qgis-developer
> Subject: Re: [QGIS-Developer] QGIS 3 itemById should return subclassed item
>
> On 13 February 2018 at 05:51, SIGéal <sigeal at sigeal.com> wrote:
>> Hi,
>>
>> This code used to work in QGIS 2.x.
>>
>> lblTitle = myComposition.getComposerItemById('title')
>> lblTitle.setText('New Title')
>>
>> However, in QGIS 2.99, myLayout.itemById('title') returns this error :
>>
>> 'QgsLayoutItem' object has no attribute 'setText'
> See discussion at
> http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-QgsLayout-itemById-returns-wrong-object-td5350947.html
>
> Nyall
> _______________________________________________
> 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
>
> ________________________________
>
> This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or info at linz.govt.nz) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.



More information about the QGIS-Developer mailing list