My plot legend (placed on the right-side) suddenly became horizontally aligned.

My code:
// Legend
legend->setDefaultItemMode( QwtLegendData::Checkable );
insertLegend
( legend,
QwtPlot::RightLegend );
connect (legend, &QwtLegend::checked, this, &XQwtPlot::slotShowItem);
// Legend
QwtLegend *legend = new QwtLegend();
legend->setDefaultItemMode( QwtLegendData::Checkable );
insertLegend( legend, QwtPlot::RightLegend );
connect (legend, &QwtLegend::checked, this, &XQwtPlot::slotShowItem);
To copy to clipboard, switch view to plain text mode
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?
Bookmarks