[Qt-interest] Qwt Error

Sujan Dasmahapatra sdh at lmglasfiber.com
Tue May 5 13:31:23 CEST 2009


Still these are the errors I am getting Srdjian.I have included qwt_plot.h header.

Plsss tell me friends how to resolve these errors.

main.cpp: In constructor `MyPlot::MyPlot(QWidget*, char*)':
main.cpp:12: error: `setAutoLegend' was not declared in this scope
main.cpp:13: error: `Qwt' has not been declared
main.cpp:13: error: `Bottom' was not declared in this scope
main.cpp:13: error: `setLegendPos' was not declared in this scope
main.cpp:20: error: `insertCurve' was not declared in this scope
main.cpp:38: error: `setCurveData' was not declared in this scope
main.cpp:42: error: `blue' was not declared in this scope
main.cpp:42: error: invalid use of undefined type `struct QPen'
/usr/local/pack/Qt-4.4.3/include/QtGui/qwindowdefs.h:69: error: forward declaration of `struct QPen'
main.cpp:42: error: `setCurvePen' was not declared in this scope
main.cpp:43: error: `green' was not declared in this scope
main.cpp:43: error: invalid use of undefined type `struct QPen'
/usr/local/pack/Qt-4.4.3/include/QtGui/qwindowdefs.h:69: error: forward declaration of `struct QPen'
main.cpp:12: warning: unused variable 'setAutoLegend'
main.cpp:13: warning: unused variable 'Bottom'
main.cpp:13: warning: unused variable 'setLegendPos'
main.cpp:42: warning: unused variable 'blue'
main.cpp:43: warning: unused variable 'green'
main.cpp: In function `int main(int, char**)':
main.cpp:56: error: 'class QApplication' has no member named 'setMainWidget'
main.cpp: At global scope:
main.cpp:6: warning: unused parameter 'name'

Kind Regards,
Sujan Dasmahapatra
-----Original Message-----
From: Srdjan Todorovic [mailto:todorovic.s at googlemail.com] 
Sent: Tuesday, May 05, 2009 2:39 PM
To: Sujan Dasmahapatra
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Qwt Error

Hi,

2009/5/5 Sujan Dasmahapatra <sdh at lmglasfiber.com>:
> Dear Friends
>
> I have installed Qwt for plotting when I am trying to compile the give
> tutorial code I ma getting a lot of errors..Mostly I think because of header
> file inclusion or .pro file add  ons……Can u say anyone how could I compile
> this piece of code for Qwt.
>
> What header files if at all I need to include and what I have to specify in
> the .pro file plss help me…

"If at all"?

> class MyPlot : public QwtPlot

If I was a compiler, I would be screaming about QwtPlot.
Maybe you forgot to include it?

> {
> public:
>   MyPlot( QWidget *parent=0, char *name=0 ) : QwtPlot( parent, name )
>   {

>   }
> };

Hope that gives you a good enough hint.

Srdjan




More information about the Qt-interest-old mailing list