I'm trying to set up the colour of a QgsSimplerMarkerSymbolerLayer.
Here is my code :
sites=iface.activeLayer()
single_symbol_renderer=sites.renderer()
symbol=single_symbol_renderer.symbol()
symbol.setSize(4)
prop = QgsProperty()
prop.setField("Couleur")
pc = QgsPropertyCollection('Color')
pc.setProperty(4, prop)
marker_symb = QgsSimpleMarkerSymbolLayer()
marker_symb.setDataDefinedProperties(pc)
sites=QgsSimpleMarkerSymbolLayer(marker_symb)
But it still not working, any help ?