I am currently writing a QGIS 3 plugin. I would like to catch the signal emmited each time the user selects a new layer in the layer panel.
I have already searched in the QGIS API (QgsProject, QgsLayerTree, QgsLayerTreeView...)
QgsLayerTreeView has a signal currentLayerChanged but I cannot find how to connect QgsLayerTreeView to QgsProject.instance().
Does anyone has an idea on what is the solution or at least where I can find some information?