Hi,
The documentation says that a TopLegend should be located between the xTop axis and the title. But when I tried the following example, the legend was located above the plot title.
Is this a bug, an error in the doc or got I something wrong?
#include <qwt/qwt_plot.h>
#include <qwt/qwt_plot_curve.h>
#include <qwt/qwt_legend.h>
#include <QApplication>
int main(int argc, char *argv[])
{
plot
->setTitle
(QString("TestTitle"));
curve->attach(plot);
plot->show();
return a.exec();
}
#include <qwt/qwt_plot.h>
#include <qwt/qwt_plot_curve.h>
#include <qwt/qwt_legend.h>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QwtPlot *plot = new QwtPlot;
plot->setTitle(QString("TestTitle"));
plot->insertLegend(new QwtLegend, QwtPlot::TopLegend);
QwtPlotCurve *curve = new QwtPlotCurve("Test");
curve->attach(plot);
plot->show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Tried with qwt 6.0.1 from Ubuntu 12.04 Repo and 6.0.2 svn
Regards,
Stefan
Bookmarks