The scale engine calculates a QwtScaleDiv, but of course you have to do something with it:
...
QwtValueList majorTicks
= scaleDiv.
ticks[QwtScaleDiv::MajorTick];
majorTicks += interval.minValue () + interval.maxValue()) / 2);
scaleWidgetColorBar->setScaleDiv (..., scaleDiv);
...
QwtScaleDiv scaleDiv = scaleEngine.divideScale(...);
QwtValueList majorTicks = scaleDiv.ticks[QwtScaleDiv::MajorTick];
majorTicks += interval.minValue () + interval.maxValue()) / 2);
scaleDiv.setTicks(QwtScaleDiv::MajorTick, majorTicks);
scaleWidgetColorBar->setScaleDiv (..., scaleDiv);
To copy to clipboard, switch view to plain text mode
Of course you can compose your QwtScaleDiv object manually without using a scale engine as well.
Uwe
Bookmarks