Problem in changing the tracker font size
Hi all,
I have a 2D plot and I want to change the font size used by the tracker pen.
My code is:
Code:
if (zoomer != NULL)
delete zoomer;
zoomer
->setMousePattern
(QwtEventPattern::MouseSelect2,Qt
::RightButton, Qt
::ControlButton);
zoomer->setRubberBandPen(c);
zoomer->setTrackerPen(c);
QFont qf
=zoomer
->trackerFont
();
zoomer
->setTrackerFont
(QFont(qf.
family(),
18,qf.
weight(), qf.
italic()));
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
Re: Problem in changing the tracker font size
Indeed setTrackerFont doesn't work.
But what you can do is to assign the font to the plot canvas ( the font of the tracker text widget is initialized with it ) before you attach your zoomer.
Another option is to overload the trackerText method and add the font to the QwtText object.
Uwe