Thank you Uwe, the plotmatrix example helps me! 
My solution:
void MainWindow::updatePlotters(double lowerBound, double upperBound) {
double maxExtent = 0;
double extent = 0;
for(int i = 0; i < currentTrader->plotters.size(); i++) {
currentTrader
->plotters.
at(i
)->setAxisScale
(QwtPlot::xBottom, lowerBound, upperBound
);
scaleWidget
= currentTrader
->plotters.
at(i
)->axisWidget
(QwtPlot::yRight);
scaleDraw = scaleWidget->scaleDraw();
extent = scaleDraw->extent(scaleWidget->font());
if(extent > maxExtent) maxExtent = extent;
scaleDraw->setMinimumExtent(maxExtent);
currentTrader->plotters.at(i)->updateLayout();
currentTrader->plotters.at(i)->replot();
}
}
void MainWindow::updatePlotters(double lowerBound, double upperBound) {
QwtScaleWidget *scaleWidget;
QwtScaleDraw *scaleDraw;
double maxExtent = 0;
double extent = 0;
for(int i = 0; i < currentTrader->plotters.size(); i++) {
currentTrader->plotters.at(i)->setAxisScale(QwtPlot::xBottom, lowerBound, upperBound);
scaleWidget = currentTrader->plotters.at(i)->axisWidget(QwtPlot::yRight);
scaleDraw = scaleWidget->scaleDraw();
extent = scaleDraw->extent(scaleWidget->font());
if(extent > maxExtent) maxExtent = extent;
scaleDraw->setMinimumExtent(maxExtent);
currentTrader->plotters.at(i)->updateLayout();
currentTrader->plotters.at(i)->replot();
}
}
To copy to clipboard, switch view to plain text mode
Added after 16 minutes:
But a small problem still remains. I thought this would go away if the plotter's have the same drawing area/size. It is about the position of the QwtPlotMarker in the lower plotter (indicator-plotter). I set his position with the position of the QwtPlotPicker from the chart-plotter (the main plotter above).
plotMarker
->setValue
(chartPlotter
->invTransform
(QwtPlot::xBottom, pos.
x()),
0);
plotMarker->setValue(chartPlotter->invTransform(QwtPlot::xBottom, pos.x()), 0);
To copy to clipboard, switch view to plain text mode
It is almost accurate, but on the right and left side it differs a little bit. In the middle it is ok. Any idea? I use QwtPlotMagnifier to zoom in the chart and give the plotter->axisScaleDiv(QwtPlot::xBottom).lowerBound() and upperBound to the other plotters. So far everything works well, expect the position of the QwtPlotMarker in the second (indicator-chart). But i think this has nothing to do with the zoom functionality.
Any idea how I can fix / optimize this? Thanks a lot!
Best regards johno
Added after 20 minutes:
better images:
PlotMarker_04.jpg
PlotMarker_05.jpg
PlotMarker_06.jpg
Bookmarks