[Qgis-developer] Some questions about PyQGIS

Germán Carrillo carrillo.german at gmail.com
Mon Apr 13 13:24:57 EDT 2009

Thanks Richard, here [1] I found this:

* mouseDoubleClickEvent() - not quite as obvious as it might seem. If the
user double-clicks, the widget receives a mouse press event (perhaps a mouse
move event or two if he/she does not hold the mouse quite steady), a mouse
release event and finally this event. It is not possible to distinguish a
click from a double click until you've seen whether the second click
arrives. (This is one reason why most GUI books recommend that double clicks
be an extension of single clicks, rather than trigger a different action.)*

I still get two release events in QgsMapTool class.

I'm trying to do a Measure Tool, and it works. The only issue is with that
event. In QGIS the measure tool draws a rubberband and the mouse right
button stops the drawing, but I want the double click stops the drawing.


[1] http://www.jtz.eggs.pl/Inne/QT-Tutorial/qwidget.html


Soluciones Geoinformáticas Libres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090413/9bee9ac8/attachment.html

More information about the Qgis-developer mailing list