[Qgis-developer] Errors with destinationCrsChanged and hasCrsTransformEnabledChanged signals

Mauro Alberti alberti.m65 at gmail.com
Sun Mar 9 10:52:55 PDT 2014


Hi everyone,
i'm not able to connect to *destinationCrsChanged *and
*hasCrsTransformEnabledChanged
*signals from  a map canvas, in a Python plugin.

My code sample is:
*self.canvas.destinationCrsChanged.connect( self.get_current_canvas_crs )*
*self.canvas.hasCrsTransformEnabledChanged[bool].connect(
self.get_on_the_fly_projection )*
and an instance of error message, when loading the plugin, is:
*AttributeError: 'QgsMapCanvas' object has no attribute
'destinationCrsChanged'*

I've tried successfully, just to test, with two other signals for a
QgsMapCanvas instance:

*self.canvas.zoomLastStatusChanged[bool].connect(
self.get_current_canvas_crs )*
*self.canvas.layersChanged.connect( self.get_current_canvas_crs )*

Perhaps the two signals with errors are not implemented in PyQGis? And in
that case, are there any workaround?

thanks,
mauro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140309/2837687c/attachment.html>


More information about the Qgis-developer mailing list