QwtPlotRenderer::render() doesn't include an external legend - instead you have to calculate the layout for the legend in your application code ( like you do it with the legend widget ) and call QwtPlotRenderer::renderLegend() manually.
Uwe
QwtPlotRenderer::render() doesn't include an external legend - instead you have to calculate the layout for the legend in your application code ( like you do it with the legend widget ) and call QwtPlotRenderer::renderLegend() manually.
Uwe
frankiefrank (28th November 2011)
Thanks for your reply. In my case the legend was indeed rendered although it was defined as ExternalLegend, is that a bug or did I misunderstand the expected behavior you describe?
I understand I can renderLegend separately but maybe I'm missing QPainter experience, could you please direct me to how I can modify my code to render the legend separately in a position of my choosing? (for example (100,100)) ?
Thanks as always for your attention and reply,
Frankie
Come on:
UweQt Code:
renderer.render(plot, &painter, ... );To copy to clipboard, switch view to plain text mode
frankiefrank (29th November 2011)
Bookmarks