Hi.
I tried to put a legend in Hisotrgr. Although the legend is displayed, there are no symbols attached to the text in the legend.
Why?
rataPlot = new HistogramItem(tr("Rata"));
rataPlot->setColor(Qt::red);
rawPlot = new HistogramItem(tr("MOL - Dati grezzi"));
rawPlot->setColor(Qt::darkGray);
qwtPlot
->setCanvasBackground
(QColor(Qt
::white));
qwtPlot
->insertLegend
(legend,
QwtPlot::BottomLegend);
legend = new QwtLegend;
rataPlot = new HistogramItem(tr("Rata"));
rataPlot->attach(qwtPlot);
rataPlot->setColor(Qt::red);
rawPlot = new HistogramItem(tr("MOL - Dati grezzi"));
rawPlot->attach(qwtPlot);
rawPlot->setColor(Qt::darkGray);
qwtPlot->setCanvasBackground(QColor(Qt::white));
qwtPlot->insertLegend(legend,QwtPlot::BottomLegend);
To copy to clipboard, switch view to plain text mode
Bookmarks