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

2018-02-12 Thread SIGéal
: QGIS-Developer [qgis-developer-boun...@lists.osgeo.org] on behalf of Nyall Dawson [nyall.daw...@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 <

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

2018-02-12 Thread Chris Crook
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 <sig...@sigeal.com> wrote: > Hi, > > This code used to work in QGIS 2.x. > > lblTitle = myComposition.getComposerItemById('title') > lbl

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

2018-02-12 Thread Nyall Dawson
On 13 February 2018 at 05:51, SIGéal 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'

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

2018-02-12 Thread SIGéal
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'| This problem is related to the