[Qgis-developer] QgsLayerTreeViewMenuProvider and default values

Richard Duivenvoorde rdmailings at duif.net
Fri Nov 18 01:02:15 PST 2016


trying to implement a 'refresh data' menu item for a layer, I followed 
this blog post to create one:


but using it removes all default options, AND it is created for ALL 

Q1: is there an option to only add this menu item to certain (1) layers?

Q2: is it possible to add the new 'refresh' option on top of all normal 
default menu items?

Q3: looking at the possibility to add a 'Transparency slider' in the 
layertree (see layer props bottom item): how difficult is it to add a 
'refresh data' button (with custom refresh data code) in the layer tree


Richard Duivenvoorde

More information about the Qgis-developer mailing list