I have 2 QwtPlot objects on the same widget and both plot will use same x-axis (it has to be two different plot, not overlap on the same one). Both plots will not have x-axis displayed and an external QwtScaleWidget will display the x-axis. I have all this in a grid layout.

The issue I'm running into is:
- The QwtPlot grid tick does not line up with the QwtScaleWidget ticks.

Qt Code:
  1. void MyWidget::SyncScale ()
  2. {
  3. xAxis->setScaleDiv(m_pQwtPlot1->axisScaleEngine(QwtPlot::xBottom)->transformation(),
  4. m_pQwtPlot1->axisWidget(QwtPlot::xBottom)->scaleDraw()->scaleDiv());
  5. int start, end;
  6. m_pQwtPlot1->axisWidget(QwtPlot::xBottom)->getBorderDistHint(start, end);
  7. xAxis->setBorderDist(start, end);
  9. }
To copy to clipboard, switch view to plain text mode 

Any support/help are greatly appreciated!