Hi

I have a my Curve class derived from QwtPlotCurve as shown
Qt Code:
  1. class Curve :public QwtPlotCurve {
  2. Q_OBJECT;
  3. public:
  4. Curve(QWidget* parent, QString s,QColor colour,int size);
  5. virtual ~Curve();
  6. QCheckBox* checkBox;
  7. float* plotData;
  8. int size;
  9. signals:
  10. void doPlotUpdate();
  11. };
  12.  
  13. Curve::Curve(QWidget* parent,QString s,QColor color,int size):
  14. checkBox(new QCheckBox(s)),
  15. plotData(new float[size]),
  16. size(size)
  17. {
  18. setPen(QPen(color));
  19. QObject::connect(this->checkBox,SIGNAL(stateChanged(int)),parent, SLOT(updatePlots()));
  20. }
To copy to clipboard, switch view to plain text mode 

My intention is to connect the signal from the checkbox to the slot updatePlots so that when the checkbox is enabled the plot is displayed. I am getting the following linking error

debug\moc_QwtSeahawkPlot.cpp:42: error: `staticMetaObject' is not a member of `QwtPlotCurve'
debug\moc_QwtSeahawkPlot.cpp: In member function `virtual void* Curve::qt_metacast(const char*)':
debug\moc_QwtSeahawkPlot.cpp:56: error: `qt_metacast' is not a member of `QwtPlotCurve'
debug\moc_QwtSeahawkPlot.cpp: In member function `virtual int Curve::qt_metacall(QMetaObject::Call, int, void**)':
debug\moc_QwtSeahawkPlot.cpp:61: error: `qt_metacall' is not a member of `QwtPlotCurve'
debug\moc_QwtSeahawkPlot.cpp: In member function `void Curve::doPlotUpdate()':

Also when I call attach I get the following compilation error.

Qt Code:
  1. mycurve=new Curve(this,"Input Data","yellow",1024);
  2. mycurve->attach(plot);
To copy to clipboard, switch view to plain text mode 

c:/Qt/4.5.0/include/qwt./qwt_plot_item.h: In member function `void QwtSeahawkPlot::updatePlots()':
c:/Qt/4.5.0/include/qwt./qwt_plot_item.h:117: error: `void QwtPlotItem::attach(QwtPlot*)' is inaccessible
SeaHawkDebug\QwtSeahawkPlot.cpp:127: error: within this context
SeaHawkDebug\QwtSeahawkPlot.cpp:127: error: `QwtPlotItem' is not an accessible base of `Curve'
mingw32-make[1]: *** [debug/QwtSeahawkPlot.o] Error 1

Could someone help me out

Regards