<div dir="ltr">Hi everyone,<div>i'm not able to connect to <i>destinationCrsChanged </i>and <i>hasCrsTransformEnabledChanged </i>signals from a map canvas, in a Python plugin. </div><div><br></div><div>My code sample is:</div>
<div><div><i>self.canvas.destinationCrsChanged.connect( self.get_current_canvas_crs )</i></div><div><i>self.canvas.hasCrsTransformEnabledChanged[bool].connect( self.get_on_the_fly_projection )</i></div></div><div>and an instance of error message, when loading the plugin, is:</div>
<div><i>AttributeError: 'QgsMapCanvas' object has no attribute 'destinationCrsChanged'</i></div><div><br></div><div>I've tried successfully, just to test, with two other signals for a QgsMapCanvas instance:</div>
<div><i>self.canvas.zoomLastStatusChanged[bool].connect( self.get_current_canvas_crs )<br></i></div><div><div><i>self.canvas.layersChanged.connect( self.get_current_canvas_crs )</i></div></div><div><br></div><div>Perhaps the two signals with errors are not implemented in PyQGis? And in that case, are there any workaround?</div>
<div><br></div><div>thanks,</div><div>mauro</div></div>