Hello world,
i have raed a tutorial which it speak about curve with QWT. In this tutorial i find this example to plot a curve during compilation:
this is the code:
#include <QApplication>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
int main(int argc, char** argv)
{
myCurve.attach(&myPlot);
QVector<double> x(5);
QVector<double> y(5);
for(int i=0;i<5;i++)
{
x.append((double)i);
y.append((double)(5-i));
}
myCurve.setData(x.data(),y.data(),x.size());
myPlot.replot();
myPlot.show();
return app.exec();
}
#include <QApplication>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
int main(int argc, char** argv)
{
QApplication app(argc,argv);
QwtPlot myPlot;
QwtPlotCurve myCurve;
myCurve.attach(&myPlot);
QVector<double> x(5);
QVector<double> y(5);
for(int i=0;i<5;i++)
{
x.append((double)i);
y.append((double)(5-i));
}
myCurve.setData(x.data(),y.data(),x.size());
myPlot.replot();
myPlot.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
this is the error:
==> see attached file
i don't why arguments are not good...
how i can plot this curve please?
thank you for your help
(the help of QWT is very difficult for my, i am a real beginner, it is the reason why i ask this)
Bookmarks