[Qgis-developer] Remove QgsTextAnnotationItem from canvas with Python

Marco Hugentobler marco.hugentobler at sourcepole.ch
Tue Jan 25 05:09:44 EST 2011


Am Dienstag, 25. Januar 2011, um 10.05:36 schrieb 
luca_manganelli at comune.trento.it:
> qgis-developer-bounces at lists.osgeo.org scritti il 25/01/2011 09.40.24
> 
> > Hi Stefan
> 
> > If the text annotation is selected, you could do this:
> And what if I have a pointer of that textannotation stored in a variable?

In this case you feed the pointer directly to removeItem:

qgis.utils.iface.mapCanvas().scene().removeItem( pointer )
 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


-- 
Dr. Marco Hugentobler
Sourcepole -  Linux & Open Source Solutions
Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland
marco.hugentobler at sourcepole.ch http://www.sourcepole.ch
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list