Hi!

I write on C++.

Question: how to use QgsCategorizedSymbolRendererV2?
Input data: 
1. Some features with unique fields (for example QgsField("id",
QVariant::String))
2. QgsVectorLayer with "memory" data provider and "Polygon" items
Task:
I need to draw this features with different colors.
Now i have such code:

QgsCategoriesList categories;

//for all ids create new category with new QgsSymbolV2 with unique color

QgsCategorizedSymbolRendererV2* renderer = new
QgsCategorizedSymbolRendererV2("id", categories);
myLayer->setRendererV2(renderer);

Any ideas?
Thanks




--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Using-QgsCategorizedSymbolRendererV2-tp5086683.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to