Skip to main content
added 57 characters in body
Source Link
Taras
  • 34k
  • 4
  • 73
  • 148

You could just replace:

layers = iface.legendInterface().layers()
layers = iface.legendInterface().layers()

with

layers = [layer for layer in QgsProject.instance().mapLayers().values()]
layers = [layer for layer in QgsProject.instance().mapLayers().values()]

You could just replace:

layers = iface.legendInterface().layers()

with

layers = [layer for layer in QgsProject.instance().mapLayers().values()]

You could just replace

layers = iface.legendInterface().layers()

with

layers = [layer for layer in QgsProject.instance().mapLayers().values()]
Source Link
Joseph
  • 76.3k
  • 7
  • 172
  • 286

You could just replace:

layers = iface.legendInterface().layers()

with

layers = [layer for layer in QgsProject.instance().mapLayers().values()]