I am trying to select data based on QgsVectorLayer() getting it's features from layer.getFeatures().next() method.

When I pass expression in that using QgsFeatureRequest().setFilterExpression(expression) where NAME column contains a space, like


the filter doesn't return any rows, even when such value is present. When I pass


It works fine.

Can anyone help?

  • 1
    What's the data provider? Can you share more of your code (a self contained snippet would be helpful) – ndawson Aug 11 '18 at 12:29

Your Answer

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

Browse other questions tagged or ask your own question.