QCustomPlot Discussion and Comments

Inheriting QCustomPlotReturn to overview

My class inherits QCustomPlot in usual way

   class MyPlot: public QCustomPlot  

I'm trying to add an Axis with
auto myAxis = axisRect()->addAxis(QCPAxis::atLeft);

And I'm getting following error
...: error: cannot initialize object parameter of type 'const QCustomPlot' with an expression of type 'MyPlot'
Am I doing something wrong? Or should I cast to QCustomPlot*?
Thanks in advance

are you calling that in a const function?

ian, no I am not