Hi all,

I have a 2D plot and I want to change the font size used by the tracker pen.

My code is:

Qt Code:
  1. if (zoomer != NULL)
  2. delete zoomer;
  3.  
  4. zoomer = new QwtPlotZoomer(qwtPlot->canvas());
  5.  
  6. zoomer->setMousePattern(QwtEventPattern::MouseSelect2,Qt::RightButton, Qt::ControlButton);
  7. zoomer->setMousePattern(QwtEventPattern::MouseSelect3,Qt::RightButton);
  8.  
  9. const QColor c(Qt::white);
  10. zoomer->setTrackerMode(QwtPicker::AlwaysOn);
  11. zoomer->setRubberBandPen(c);
  12. zoomer->setTrackerPen(c);
  13. QFont qf=zoomer->trackerFont();
  14. zoomer->setTrackerFont(QFont(qf.family(),18,qf.weight(), qf.italic()));
To copy to clipboard, switch view to plain text mode 

Even if the code is compiled without errors or warnings the font size of tracker pen is not changed at all in the plot (the default size is 10)! The color instead is set properly.

Thank you in advance for your help!

Bye