<div dir="ltr"><div dir="ltr"><div>Hi all</div><div><br></div><div>The API docs for QgisInterface[1] mention the existence of a `registerMapLayerConfigWidgetFactory()` method which says in its documentation:</div><div><br></div><div>> Register a new tab in the vector layer properties dialog. </div><div><br></div><div>I've been trying to test this out and see if I can add a new panel to a layer's properties dialog via a Python plugin. So far I've had no luck. Couldn't find any other docs/samples online showing how to do this. Perhaps someone can help me out?</div><div><br></div><div>Here is what I have:</div><div><br></div><div>-  made a custom .ui file in Qt designer with a simple QWidget that only has a QLabel inside</div><div>-  implemented a class inheriting from both `qgis.gui.QgsMapLayerConfigWidget` and my ui file (after it is loaded with uic.loadUiType)</div><div>- implemented a class inheriting from `qgis.gui.QgsMapLayerConfigWidgetFactory`. This class implements all of the methods declared as *virtual* in the cpp API, including the `createWidget()`, which returns a new instance of my custom maplayerconfigwidget class<br></div><div>- in my plugin's `initGui()` method I'm calling `iface.registerMapLayerConfigWidgetFactory()` and pass along my custom factory</div><div><br></div><div>I guess this should be enough to have a minimum working prototype. However, this is what happens:</div><div><br></div><div>- When I load up a vector layer and then open it's properties dialog, QGIS just crashes with a core dumped message.<br></div><div>- When I load up a raster layer and then open it's properties dialog, nothing happens. I suspect this functionality is probably not even available for raster layers. Is this true?</div><div><br></div><div>Can someone provide some pointers or some existing reference on how this would work? Thanks in advance<br></div><div><br></div><div>[1] - <a href="https://qgis.org/api/classQgisInterface.html#a2c64949239a7717d181e34d6f2c47851">https://qgis.org/api/classQgisInterface.html#a2c64949239a7717d181e34d6f2c47851</a> <br></div><div><br>-- <br><div dir="ltr" class="gmail_signature">___________________________ ___ __<br>Ricardo Garcia Silva</div></div></div></div>