PDA

View Full Version : QwtLegend Position changing problem?



umituzun84
19th March 2010, 12:15
Hi All;

I add an legend to my plot by ordenary way like below;
QwtLegend *legend = new QwtLegend;
legend->setItemMode(QwtLegend::CheckableItem);
insertLegend(legend, QwtPlot::RightLegend);

When I want to change the legendPosition in runtime I dispatch this command like below;

plotLayout()->setLegendPosition(QwtPlot::TopLegend);

This commad changing my legend's position but now viewing structure. I mean when legend on the right it show plot items in 1 column multi row, after I change the top position I am waiting to show my plot items in one row multi column view, but it still use 1 column multi row representation.

What should I do?
Thanks in advance.
Regards.

Uwe
19th March 2010, 13:25
Always reinsert a new Legend if you want to change the position.

Uwe