[Qgis-developer] Referencing QgsComposerAttributeTable from a Print Composer Template

Jakob Lanstorp jlanstorp at gmail.com
Thu May 28 04:08:26 PDT 2015


When referencing a QgsComposerAttributeTable from a Print Composer template
like this:

composerView = composerList[0]
composition = composerView.composition()
attrtable = composition.getComposerItemById('MyComposerAttributeTable') 

I get a <class 'qgis._core.QgsComposerFrame'> returned in attrtable object.
I would expect a QgsComposerAttributeTable?

Need to set a filter on the attribute table in the print composer. 

Since the composer is large with a lot of items, I have made the template in
the print composer and getting the items with
getComposerItemById('MyItemId'). If I build the composer from scratch in
Python, I can of course use the QgsComposerAttributeTable, but is not an
option here.



-----
Jakob Lanstorp
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Referencing-QgsComposerAttributeTable-from-a-Print-Composer-Template-tp5207995.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list