I am attempting to create my own custom QwtPlot class, and use a static_cast to override the existing QwtPlot object in the programs dialog.
The dialog has a QwtPlot object called plotpage, I need to exchange my own variable called plot from my class myQwtPlot
Qt Code:
  1. QwtPlot* plot = static_cast<myQwtPlot*>(plotpage);
  2. if(!plot)qFatal("Failed to cast the plot pointer from myQwtPlot to QwtPlot");
  3. plot->setTitle("Account Balance Plot");
To copy to clipboard, switch view to plain text mode 
The code above is extracted from the dialog class constructor and appears to run correctly. When I attempt to use the plot variable in other member functions I get a SIGSEGV failure. The program is still expecting the original plotpage variable.
Could some one confirm I am using the correct approach, and have the correct syntax for the static_cast command.
Thanks,
Carlton.