How can I get features that satisfy a QgsExpression using PyQGIS?

المشرف العام

Administrator
طاقم الإدارة
I have two fields say "State" and "name" which would be get from the two comboboxes. After which, based on the current text in the combo box, I want to make QgsExpression and feature that satisfies QgsExpression should be get back and for that feature I would do spatial operations. How this could be done using python?

I want something like this:

state= current text in state combo city= current text in city combofeature = "state" and "city"exp = QgsExpression(feature)

أكثر...
 
أعلى