[Qgis-developer] Expression context and custom functions

Hugo Mercier hugo.mercier at oslandia.com
Thu Sep 3 08:12:48 PDT 2015


Hi,

I am using custom expressions functions for a plugin.
Something like this :

class MyFunction( QgsExpression.Function ):
    def func( self, values, feature, parent ):
        feature.geometry()
        ...

The problem is that "feature" is now a QgsExpressionContext(), not a
QgsFeature anymore.
I cannot find how to access the feature from the context. Did I miss
something ?

Thanks


More information about the Qgis-developer mailing list