<div dir="ltr"><div><div>Hi,<br><br></div>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:<br><br>html_item = mycomp.getComposerItemById('myhtml')<br>composer_html <span class="">=</span> mycomp.getComposerHtmlByItem(html_item)<br><br></div>Regards<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 7:11 AM, G. Allegri <span dir="ltr"><<a href="mailto:giohappy@gmail.com" target="_blank">giohappy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The QgsComposerHtml class behaves bad from Python.<div>When a new QgsComposerHtml is instantiated I get a segmentation fault and QGIS crashes.</div><div>Something wrong happens even when one tries to obtain an existing object from a composition:</div><div><br></div><div>mycomp.getComposerItemById('myhtml') -> QgsComposerFrame instance</div><div><br></div><div>I don't understand how a QgsComposerFrame is returned given that QgsComposerHtml is not related to this class. It derives from QgsComposerMultiFrame, and in case it can contains frame objects...</div><div><br></div><div>It happens both on 2.6 and master, both on Linux and Windows.</div><div><br></div><div>I've opened an issue: <a href="http://hub.qgis.org/issues/12009" target="_blank">http://hub.qgis.org/issues/12009</a></div><div><br></div><div>giovanni</div><span class="HOEnZb"><font color="#888888"><div><div><br></div>-- <br><div><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div><div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><p><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">-------------------</span></b></p><b>Akbar Gumbira<br></b></div><b>Software Engineer</b><br><b>Geospatial, NLP, Data Mining, Machine Learning, Artificial Intelligence</b></div></div>
</div>