On 28 May 2015 at 21:08, Jakob Lanstorp <jlanst...@gmail.com> wrote:
> 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?
>

Call multiFrame() on the frame to get a reference to its parent
attribute table. Tables can be split over multiple frames, so each
item is it's own frame. The attribute table is the parent multiframe
which controls what is displayed in each individual frame.

Nyall
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to