PDA

View Full Version : qwt program builds but why there is no ouput window?



anamr
1st November 2010, 13:53
I wrote a simple program to draw a graph using qwt in qt.when i build-run it doesnt give any error in compile output .BUt it doesnt display any output and says in application ouput tab in qt as

Starting F:\Qt\qwtnew-build-desktop\debug\qwt.exe...
F:\Qt\qwtnew-build-desktop\debug\qwt.exe exited with code -1073741515



I pasted the pro file of my project below.
Please let me know if any thing has to be added to pro file or is the code i wrote is wrong ,or any other issues it is related with.
I am doin project based on this , and need to resolve the issue very soon.
so please help.......




.Pro file of my project
-----------------------------------------------------------------------------------------
QT += core gui

TARGET = qwt
TEMPLATE = app
CONFIG += qwt
SOURCES += \
main.cpp
INCLUDEPATH += C:\Qwt-6.0.0-rc3\include

LIBS += C:\Qwt-6.0.0-rc3\lib\qwtmathml.dll
LIBS += C:\Qwt-6.0.0-rc3\lib\qwt.dll

----------------------------------------------------------------------------------------

.cpp file of my project
-----------------------------------------------------------------------------------------

#include<qwt.h>
#include<math.h>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include<QApplication>
int main(int argc, char **argv )
{


QwtPlot *myPlot = new QwtPlot();

// add curves
QwtPlotCurve *curve1 = new QwtPlotCurve("Curve 1");

// copy the data into the curves
const int points = 500;
double x[ points ];
double sn[ points ];
double sg[ points ];

for( int i=0; i<points; i++ )
{
x[i] = (3.0*3.14/double(points))*double(i);

sn[i] = 2.0*sin( x[i] );

}
curve1->setRawSamples(x, sn, points );

curve1->attach(myPlot);

// finally, refresh the plot
myPlot->replot();
}

FelixB
1st November 2010, 15:01
have a look at the qwt examples...

little hint: "show()"