QGIS uses small image preview icons for its layers in the legend and layer tree. How can I create these for a given layer as an image object (
QImage I presume)?
As I am looking for a PyQGIS solution, here is my existing code:
layer = iface.activeLayer()
How do I get this layer's preview icon?