I have the following code which is executed when the mouse clicks on a button and provides a new value of centerFreq:
double interval = 48000;
d_interval.setMinValue(::centerFreq - 25000);
double minimum = d_interval.minValue();
d_interval.setMaxValue( minimum + interval );
double maximum = d_interval.maxValue();
double interval = 48000;
d_interval.setMinValue(::centerFreq - 25000);
double minimum = d_interval.minValue();
d_interval.setMaxValue( minimum + interval );
double maximum = d_interval.maxValue();
QwtPlot::setAxisScale( QwtPlot::xTop, minimum, maximum, 10000 );
To copy to clipboard, switch view to plain text mode
It functions ok but I would like to change two things.
First, say the centerFreq has a value of 7192000, then the scale labels display as 7.19e+06, 7.2e+06, etc.
I would like to know how to make the labels display like 7.190, 7.200, etc.
Secondly, the grid has 5 major ticks with 4 minor ticks in between.
I would like 9 minor ticks in between each major tick.
I tried setting up a QwtScaleDiv and it worked but it overwrote the labels calculated from centerFreq.
Any tips as how I can accomplish these two changes?
Thanks for any help.
Bookmarks