robotics
13th June 2011, 16:20
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:::
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "qwt.h"
#include "qwt_plot.h"
#include <QFileSystemWatcher>
#include "qwt_knob.h"
#include "cmath"
#include "qwt_curve_fitter.h"
#include "qwt_plot_curve.h"
#include "qwt_text.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
double xval[5]={10,20,30,40.4,50};
double yval[5]={1,2.2,3,4,5};
QwtPlot plot(QwtText("CppQwtExample1"));
plot.setTitle("first plot");
plot.setTitle("first_plot");
plot.setAxisTitle(QwtPlot::xBottom, " System time [h:m:s]");
plot.setAxisScale(QwtPlot::xBottom, 0,60 );
plot.setAxisTitle(QwtPlot::yLeft, "Degree");
plot.setAxisScale(QwtPlot::yLeft, -60,60 );
plot.setAutoReplot(true);
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
curve1->setPen(QPen(Qt::blue));
curve1->setRawSamples(xval,yval,5);
curve1->attach(&plot);
plot.replot();
plot.show();
}
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:::
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "qwt.h"
#include "qwt_plot.h"
#include <QFileSystemWatcher>
#include "qwt_knob.h"
#include "cmath"
#include "qwt_curve_fitter.h"
#include "qwt_plot_curve.h"
#include "qwt_text.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
double xval[5]={10,20,30,40.4,50};
double yval[5]={1,2.2,3,4,5};
QwtPlot plot(QwtText("CppQwtExample1"));
plot.setTitle("first plot");
plot.setTitle("first_plot");
plot.setAxisTitle(QwtPlot::xBottom, " System time [h:m:s]");
plot.setAxisScale(QwtPlot::xBottom, 0,60 );
plot.setAxisTitle(QwtPlot::yLeft, "Degree");
plot.setAxisScale(QwtPlot::yLeft, -60,60 );
plot.setAutoReplot(true);
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");
curve1->setPen(QPen(Qt::blue));
curve1->setRawSamples(xval,yval,5);
curve1->attach(&plot);
plot.replot();
plot.show();
}