Hi all,

seems expression filtering of features does not works when used from Python.
Here is my test code for Python console:

layer = iface.mapCanvas().currentLayer()
expr = '"dt" = \'2014-07-05\' AND abs("y" - 3.0) <= 0.000001'
request = QgsFeatureRequest().setFilterExpression(expr)
for f in layer.getFeatures(request):
  print 'found'

This code find no matches in attached shapefile when executed from Python
console, but when I try to use same expression in "Select by Expression" tool it
selects one feature.

Maybe I miss something? Should I open a ticket?

-- 
Alexander Bruy

Attachment: test.tar.bz2
Description: BZip2 compressed data

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to