Hi Devs, Thinking about creating a small plugin which would add a 'Layer tree embedded widget' to a layer in the legend, I hit:
https://github.com/qgis/QGIS/pull/3170 with a nice example on how to create such a widget (with 2 minor tweaks see below). But my question is if it is possible (in the python plugin) to attach such widget to a specific layer? Now it is working but you can only activate it via the layerproperties dialog. I could not find a example or hint for it. Any pointers appreciated. Regards, Richard Duivenvoorde PS To make Martins example https://github.com/qgis/QGIS/pull/3170) work in QGIS3: from PyQt4.QtGui import QComboBox becomes from qgis.PyQt.QtWidgets import QComboBox QgsLayerTreeEmbeddedWidgetRegistry.instance().addProvider(provider) becomes QgsGui.layerTreeEmbeddedWidgetRegistry().addProvider(provider) _______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
