<html><body>
<p>Hi,<br>
<br>
I wrote a PYTHON plugin that does a simple feature select on a QgsVectorLayer:<br>
<br>
  pnt = &lt;coordinates of mouse click on map &gt;<br>
  myLayer= &lt;QgsVectorLayer Object&gt;<br>
  tolerance = 1<br>
  rectangle = QgsRectangle()<br>
  rectangle.setXMinimum (pnt.x() - tolerance)<br>
  rectangle.setXMaximum (pnt.x() + tolerance)<br>
  rectangle.setYMinimum (pnt.y() - tolerance)<br>
  rectangle.setYMaximum (pnt.y() + tolerance)<br>
  myLayer.select(rectangle , True)<br>
<br>
in QGIS 1.6 this code works with both shapefiles and postgis layers,<br>
in QGIS 1.7 it works ONLY in postgis layers, on shapefile layers it always returns 0 features.</body></html>