[Qgis-developer] Using QgsCategorizedSymbolRendererV2
hubbatov
hubbatov at mail.ru
Wed Oct 30 11:43:16 PDT 2013
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.
More information about the Qgis-developer
mailing list