Once created a layer, how can I hide/show it? I can enable/disable the rendering of a specific layer by selecting the checkbox through QGIS, but I need to do it programmatically with PyQGIS.
How can I show/hide(not remove) a label from Python code?
I'm looking for something like:
aLayer = self.addVectorLayer(uri.uri(), layerName, self.dbConn.getProviderName())
aLayer.Hide()
....
aLayer.Show()
vl
(from the similar code sample in an earlier question) toaLayer
. It's easy to confuse the lowercase letterl
with the digit1
.