[Qgis-developer] Creating a new QgsComposerHtml from Python causes segmentation fault

Nyall Dawson nyall.dawson at gmail.com
Mon Jan 19 19:12:16 PST 2015


On 20 January 2015 at 13:48, Akbar Gumbira <akbargumbira at gmail.com> wrote:
> Hi,
>
> When we call getComposerItemById, it will return QgsComposerItem, which can
> be many things: QgsComposerLabel, QgsComposerLegend, QgsComposerFrame,
> QgsComposerPicture, etc. In case of the item is html frame, it will return
> QgsComposerFrame. Unlike other items that you can get the component
> directly, to get the QgsComposerHTML itself you should do:
>
> html_item = mycomp.getComposerItemById('myhtml')
> composer_html = mycomp.getComposerHtmlByItem(html_item)
>

Note that getComposerHtmlByItem is deprecated and will be removed at
some stage. I'll implement a better solution to this issue.

Nyall


More information about the Qgis-developer mailing list