Hello!
I'm having a problem with Qwt::clear() in my software. Essentialy, here is the scene:
My software (QMainWindow-based) has three widgets in wich three Qwt:: plot are included (via "ui"). I put a button in the Menu_bar that should clear all data in the graphs (i.e. all the lines and curves that were plotted) and I figured out that the code for doing so would be:
gra->plot->clear();
gra->plot->replot();
gra2->plot->clear();
gra2->plot->replot();
gra3->plot->clear();
gra3->plot->replot();
gra->plot->clear();
gra->plot->replot();
gra2->plot->clear();
gra2->plot->replot();
gra3->plot->clear();
gra3->plot->replot();
To copy to clipboard, switch view to plain text mode
(gra, gra2 and gra3 are the graphs from graf.cpp, which creates the each one a QwtPlot plot).
The problem is that, while when a click the button everything runs fine (i.e. the curve is indeed deleted), when I put new data to be plot, the software crash and gives no specific message saying what is the error.
I already did enough tests that demonstrates that is the clear() function that is leading to the crash, not the plot() or any other thing in the system.
Do somebody know how to solve the problem? In any case, I may put more code for you to analyze.
Thanks!
Martin/Momergil
Bookmarks