kota
11th April 2008, 13:02
Hello Qt community,
I'm quite new to Qt and its my first post here. I have a problem with the zoomer. I tried some solutions posted here but non is working. Im using Qt3 and qwt500
My Problem:
I'm plotting different curves on a qwt-chart. When not using the zoomer, the change between a graph with an x axis range 0...1 and some other graph with an x axis range from 20..200 is accomplished fine. When I use the zoomer in one of the plotted curves, plotting the next graph does not adopt its apropriate x axis scale any more, but uses the last one.
I tried the setZoomBase() before a replot but also after a replot. I even delete the zoomer before a new replot, and create it after the replot. It's not working.
The code fragment:
// delete zoomer
if(NULL != canvasZoomer)
{
delete canvasZoomer;
}
// all curves calculated , do replot
qwtPlotChartVisu->replot();
// create zoomer
canvasZoomer = new QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, qwtChartVisu->canvas() );
canvasZoomer->setSelectionFlags( QwtPicker::DragSelection );
canvasZoomer->setTrackerMode(QwtPicker::AlwaysOff);
canvasZoomer->setZoomBase();
Thank you and kind regards!
I'm quite new to Qt and its my first post here. I have a problem with the zoomer. I tried some solutions posted here but non is working. Im using Qt3 and qwt500
My Problem:
I'm plotting different curves on a qwt-chart. When not using the zoomer, the change between a graph with an x axis range 0...1 and some other graph with an x axis range from 20..200 is accomplished fine. When I use the zoomer in one of the plotted curves, plotting the next graph does not adopt its apropriate x axis scale any more, but uses the last one.
I tried the setZoomBase() before a replot but also after a replot. I even delete the zoomer before a new replot, and create it after the replot. It's not working.
The code fragment:
// delete zoomer
if(NULL != canvasZoomer)
{
delete canvasZoomer;
}
// all curves calculated , do replot
qwtPlotChartVisu->replot();
// create zoomer
canvasZoomer = new QwtPlotZoomer( QwtPlot::xBottom, QwtPlot::yLeft, qwtChartVisu->canvas() );
canvasZoomer->setSelectionFlags( QwtPicker::DragSelection );
canvasZoomer->setTrackerMode(QwtPicker::AlwaysOff);
canvasZoomer->setZoomBase();
Thank you and kind regards!