Draw histogram with QwtPlot
Hello everybody. I quite new to the QT/Qwt scheme and I've run into a difficulty.
I am trying to plot a histogram using the QwtPlot, based on the example found in Qwt. When the user clicks a button a new window opens and a histogram is drawn in it. My problem is that the histogram is just plotted and then vanishes, leaving the window open but empty. The part of the code inside the clicked button section is like that:
Code:
// ....
//Passing Data to histogram
// ...
plot.show();
nw->show();
If I create a Modal MessageBox right after the nw->show part, I can see the histogram. But as soon as the OK is pressed, it disappears ....
Please any help would be really appreciated!!!
Re: Draw histogram with QwtPlot
When you create at widget on the stack it is gone when you leave the procedure. Allocate it with new instead.
Uwe
Re: Draw histogram with QwtPlot
Thank you very much!
It was simple indeed!!! :)