What I'm trying to achieve in 6.1 is the lower right horizontal slider in the example project from 6.0. The one that goes from 1000 to 3000, has major labels every 500 and the slider step size is 10.
What I'm trying to achieve in 6.1 is the lower right horizontal slider in the example project from 6.0. The one that goes from 1000 to 3000, has major labels every 500 and the slider step size is 10.
Scale and step sizes have been decoupled because of non linear ( f.e. logarithmic ) scales - what is a new feature of Qwt 6.1
For controlling the major ticks see: QwtAbstractScale::setScaleMaxMajor( int ), but the default setting of 8 should be o.k. Remove all what you tried so far and simply do a "slider->setScale( 1000, 3000);"
For controlling the number of steps have a look at the methods in QwtAbstractSlider. In case of a linear scale you can calculate the number of steps easily this way: numSteps = ( max - min ) / stepSize;
Uwe
snowbound (14th March 2014)
Bookmarks