I am trying out a simple random graph plot just to check the working of my library qwt.......
my code looks like following and I am getting error saying "C:\Qt\2010.05\qwt-build-desktop\debug\qwt.exe exited with code -1073741511"
please help me....my code is simple:::
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3. #include "qwt.h"
  4. #include "qwt_plot.h"
  5. #include <QFileSystemWatcher>
  6. #include "qwt_knob.h"
  7. #include "cmath"
  8. #include "qwt_curve_fitter.h"
  9. #include "qwt_plot_curve.h"
  10. #include "qwt_text.h"
  11.  
  12.  
  13. MainWindow::MainWindow(QWidget *parent) :
  14. QMainWindow(parent),
  15. ui(new Ui::MainWindow)
  16. {
  17. ui->setupUi(this);
  18.  
  19. }
  20.  
  21. MainWindow::~MainWindow()
  22. {
  23. delete ui;
  24. }
  25.  
  26. void MainWindow::on_pushButton_clicked()
  27. {
  28. double xval[5]={10,20,30,40.4,50};
  29. double yval[5]={1,2.2,3,4,5};
  30. QwtPlot plot(QwtText("CppQwtExample1"));
  31. plot.setTitle("first plot");
  32. plot.setTitle("first_plot");
  33. plot.setAxisTitle(QwtPlot::xBottom, " System time [h:m:s]");
  34. plot.setAxisScale(QwtPlot::xBottom, 0,60 );
  35. plot.setAxisTitle(QwtPlot::yLeft, "Degree");
  36. plot.setAxisScale(QwtPlot::yLeft, -60,60 );
  37. plot.setAutoReplot(true);
  38. QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
  39. curve1->setPen(QPen(Qt::blue));
  40. curve1->setRawSamples(xval,yval,5);
  41. curve1->attach(&plot);
  42. plot.replot();
  43. plot.show();
  44.  
  45. }
To copy to clipboard, switch view to plain text mode