I'm trying to make a wfs layer transparent, but it gives me a mistake, but I can't solve it until now.
This is my code:
uri ='http://gstore.unm.edu/apps/rgis/datasets/6ca5428a-a78c-4c82-8120-da70dc92f2cc/services/ogc/wfs?SERVICE=wfs&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=tl_2010_35_state10'
wfslayer = QgsVectorLayer(uri, "MEXICO", "WFS")
QgsProject.instance().addMapLayer(wfslayer)
So far everything is correct
renderer = wfslayer.rendererV2()
In this function it gives me the mistake
I don't know if it's a problem with the version (QGIS 3.16.2) of the program or with the code.
It no longer lets me put the rest of the code.
symbol = renderer.symbol()
symbol.setAlpha(0.5)