[Qgis-developer] formatted text in QgsTextAnnotationItem

Siegfried.Blank at lazbw.bwl.de Siegfried.Blank at lazbw.bwl.de
Tue Apr 14 01:47:58 PDT 2015


Hello all,
i'm writing a python plugin and use QgsTextAnnotationItem like

        message = "Hello world"
        textItem = QgsTextAnnotationItem( iface.mapCanvas() )
        textItem.setMapPosition(myPoint)
        textItem.setFrameSize(QSizeF(350,80))
        textItem.setDocument(QTextDocument(message))
        textItem.update()

How can I format the text like
        message = "Hello <b>world</b>" (this will not work ;-)

Thanks for any help

Siggi


More information about the Qgis-developer mailing list