I would like to make use of Signal and Slot while using PyQgis along with PyQt4.

Despite spending some time trying out tutorials and some somewhat related post on gis.stackexchange I can't figure out a proper way of using the canvasClicked signal returned from the QgsMapToolEmitPoint Class (API doc).

Here after is where I'm at. I am building my application from the few tutorials man can find over the internet.

    self.clickPoint_action = QAction(
        "Click Point",

    # create toolbar

    # connect the tool

    # create the map tool(s)
    self.tool_clickPoint = QgsMapToolEmitPoint(self.map_canvas)

def clickPoint(self):

So, I understand how to set my map tool (and successfuly use other built-in and custom MapTool), but can't figure out where to go from there to get the corresponding QgsPoint emitted after a mouse click.

I have few experience on Python and just dive into Qt and PyGIS but already have some background mostly wth java.

thanks for sharing!


You are just missing the connect for the clicked signal:


 def clicked(self, point, button):
  • That perfectly answers my question. Very clear. But I don't understand where that was described in the API doc. Jul 7 '14 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.