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.
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to