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
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.Qt Code:
if(!plot)qFatal("Failed to cast the plot pointer from myQwtPlot to QwtPlot"); plot->setTitle("Account Balance Plot");To copy to clipboard, switch view to plain text mode
Could some one confirm I am using the correct approach, and have the correct syntax for the static_cast command.
Thanks,
Carlton.
Bookmarks