> but the connect function doesn't seem to
> emit the point or call the slot.  Here is some sample code:
> 
> emitPoint = qgis.gui.QgsMapToolEmitPoint(w.canvas)
> w.canvas.setMapTool(emitPoint)
> w.connect(emitPoint, PyQt4.QtCore.SIGNAL("canvasClicked(QgsPoint)"),
> printHello)
> 
> Bob

Hi Bob,Here is an working connection that I use in one of my plugins:

self.point=gui.QgsMapToolEmitPoint(self.canvas)QObject.connect(self.point, 
SIGNAL("canvasClicked(const QgsPoint &,Qt::MouseButton)"), self.export)

Pay attention to "canvasClicked(const QgsPoint &,Qt::MouseButton)" it has to be 
exactly like that otherwise you will get no signal.
Regards,
Pablo.                                    
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to