Hi I can't find a python solution how to customize actions shown in the legend menu opende using right click button
QAction registered in the QgsLegend can be retrieved using method: QList< LegendLayerAction >QgsLegend::legendLayerActions( QgsMapLayer::LayerType type ) const; and the I can use iface.legendInterface().removeLegendLayerAction(QAction) but this method is not available in QgsLegendInterface. 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? iface.actionRemoveLayer() refer only to "Remove layer" QAction in layer menu. could be useful add QgsLegend::legendLayerActions to api to allow deep customization? thanks, Luigi Pirelli
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer