I want to change the font size of my QwtLegend.
I tried
QFont label_font("Helvetica");
label_font.setPointSize(20);
QwtLegend *legend = new QwtLegend();
legend->setFont(label_font);
plot->insertLegend(legend, QwtPlot::TopLegend, 1.0);
and
QFont label_font("Helvetica");
label_font.setPointSize(20);
QwtLegend *legend = new QwtLegend();
plot->insertLegend(legend, QwtPlot::TopLegend, 1.0);
plot->legend()->setFont(label_font);
But both ways do not work. What is wrong here? How can I change the font size of QwtLegend items?
Seems like the font is taken from the legend's parent. I wrote the font into the plot's stylesheet and it worked.