Hi I've got a vector file (shp) with a bunch of points in it. I want to load the points to the canvas with a specific color (not the random color QGIS provides). I've tried a couple of tutorials, but the code provided doesn't change the color.
*mask = QgsVectorLayer(maskPath, "my_mask", "ogr")* *sy = QgsSymbol( mask.geometryType() )* *sy.setFillColor(Qt.red)* * * *renderer = QgsSingleSymbolRenderer( mask.geometryType() )* *renderer.addSymbol( sy )* *renderer.updateSymbolAttributes()* * * *mask.setRenderer( renderer )* *mask.triggerRepaint()* *self.iface.legendInterface().refreshLayerSymbology(mask)* Did I forget anything, or should I do something diffrently? Chris
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
