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:
dplot = new plot(this );
const int margin = 4;
dplot->setContentsMargins( margin, margin, margin, margin );
setCentralWidget( dplot );
dplot = new plot(this );
const int margin = 4;
dplot->setContentsMargins( margin, margin, margin, margin );
setCentralWidget( dplot );
To copy to clipboard, switch view to plain text mode
and in Mainwindow.h I have declared the class plot like this:
#include <QMainWindow>
class plot;
{
Q_OBJECT
public:
MainWindow();
private Q_SLOTS:
private:
private:
plot *dplot;
};
#include <QMainWindow>
class plot;
class MainWindow: public QMainWindow
{
Q_OBJECT
public:
MainWindow();
private Q_SLOTS:
private:
private:
plot *dplot;
};
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.
Bookmarks