[Qgis-developer] Remove QgsTextAnnotationItem from canvas with
Python
Marco Hugentobler
marco.hugentobler at sourcepole.ch
Tue Jan 25 03:40:24 EST 2011
Hi Stefan
If the text annotation is selected, you could do this:
selectedItems = qgis.utils.iface.mapCanvas().scene().selectedItems()
for i in range (len(selectedItems)):
item=qgis.utils.iface.mapCanvas().scene().removeItem(selectedItems[i])
Regards,
Marco
Am Dienstag, 25. Januar 2011, um 08.46:47 schrieb Ziegler Stefan:
> Hi
>
> is there a way to remove text annotations from the map canvas with Python?
>
> regards
> Stefan
>
> Mit freundlichem Gruss
> Stefan Ziegler
> Leiter amtliche Vermessung
>
> Amt für Geoinformation
> Rötistrasse 4
> 4501 Solothurn
> 032 627 75 96
> _______________________________________________
> 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