Hello all,

I have developed a code for plotting sine wave in qwt.I have made a subclass of QWT with the name of plot. I want to show this plot as widget in mainwindow. I did following in Mainwindow.cpp:
Qt Code:
  1. dplot = new plot(this );
  2. const int margin = 4;
  3. dplot->setContentsMargins( margin, margin, margin, margin );
  4.  
  5. setCentralWidget( dplot );
To copy to clipboard, switch view to plain text mode 
and in Mainwindow.h I have declared the class plot like this:
Qt Code:
  1. #include <QMainWindow>
  2.  
  3. class plot;
  4.  
  5. class MainWindow: public QMainWindow
  6. {
  7. Q_OBJECT
  8. public:
  9. MainWindow();
  10.  
  11. private Q_SLOTS:
  12.  
  13.  
  14. private:
  15.  
  16.  
  17. private:
  18. plot *dplot;
  19.  
  20. };
To copy to clipboard, switch view to plain text mode 

I am facing following error after compiling:

In constructor 'MainWindow::MainWindow()':
error: no matching function for call to 'plot:lot(MainWindow* const)'
candidates are: plot:lot()
plot:lot(const plot&)

Please help me.