[Qgis-developer] How to refresh the legend from a plugin

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Jul 27 06:59:32 EDT 2007


Jürgen E. Fischer wrote:
> Hi there,
> 
> I'm looking for a way to refresh the legend from a plugin.  I didn't
> find a way to get to the legend from a plugin.
> 
> My plugin adds values to unique value renderers, the features render as
> expected, but the legend isn't updated.
> 

  I think during my experimental period I found a way to do this, but it 
involved traversing the Qt widget tree until I found the legend widget 
and then hooking up some signals. It would have been very fragile to any 
change in the Qgis application design!

  Barry



More information about the Qgis-developer mailing list