<div dir="ltr">Hi<div><br></div><div>I can't find a python solution how to customize actions shown in the legend menu opende using right click button</div><div><br></div><div>QAction registered in the QgsLegend can be retrieved using method:</div>

<div><br></div><div>QList< LegendLayerAction >QgsLegend::legendLayerActions( QgsMapLayer::LayerType type ) const;<br></div><div><br></div><div>and the I can use iface.legendInterface().removeLegendLayerAction(QAction)</div>

<div><br></div><div>but this method is not available in QgsLegendInterface.</div><div><br></div><div>Other way is to get QAction that is listed in iface.action* and then use removeLegendLayerAction, but not all QAction seems available in iface and none in legendInterface(). e.g How to remove "Remove" QAction in this menu?</div>

<div>iface.actionRemoveLayer() refer only to "Remove layer" QAction in layer menu.<br></div><div><br></div><div>could be useful add QgsLegend::legendLayerActions to api to allow deep customization?</div><div><br>

</div><div>thanks, Luigi Pirelli</div></div>