1 Attachment(s)
Qwt right-side legend suddenly went horizontal
My plot legend (placed on the right-side) suddenly became horizontally aligned.
https://i.imgur.com/Bo7vkmD.png
My code:
Code:
// Legend
legend->setDefaultItemMode( QwtLegendData::Checkable );
insertLegend
( legend,
QwtPlot::RightLegend );
connect (legend, &QwtLegend::checked, this, &XQwtPlot::slotShowItem);
Frankly, the only thing I'm aware of changing in the plotting part of my code was that I moved the location of my base plotting library (the code shown above and some more) and created a new .so file for these wrappers. So it makes no sense how this would cause the problem.
I'm wondering how to fix this and make the two check-buttons vertical again?
Re: Qwt right-side legend suddenly went horizontal
Have a look at the implementation of QwtPlot::insertLegend and how QwtLegend::setMaxColumns is used.
Uwe
Re: Qwt right-side legend suddenly went horizontal
Thanks Uwe.
Still not sure what caused the problem all of a sudden, but setting the max columns to 1 fixed the issue.
legend->setMaxColumns(1);