[Qgis-developer] python: which symbol for classified feature

Richard Duivenvoorde rdmailings at duif.net
Sat Apr 25 16:47:04 EDT 2009


Hi devs,

I'm trying to determine the symbol for a feature when a layers is 
classified in one way or another, using the python interface.

If I'm correct, I can ask a renderer for it's symbols (via symbols()), 
returning me a List of symbols used, but I cannot myself determine, 
given a feature with which symbol it's (going to be) associated.

Looking at some cpp code, I find a protected member symbolForFeature.

Should I use that one? And if possible can this be made public via the 
python interface?

Or am I on the wrong track anyway, and should I ask another class for 
the color and pen of a certain classified feature?

TIA & Regards,

Richard Duivenvoorde


More information about the Qgis-developer mailing list