Is it possible to change the color while adding a vector layer?
I have a vector layer with water areas and want to load it with a blue color style. The layer is added with:
QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
Can I change the color after or while loading?
vlayer.renderer().symbol().setColor(QColor.fromRgb(50,50,250)). See also this answer. – mins Mar 01 '22 at 09:43