Hi All.
I'm using two QwtScaleWidgets as scales for a QGraphicsView. When the visible sceneRect of the view changes I send signals to update the Qwt scales.
This works for the horizontal scale, but not for the vertical one and I'm not sure why. The vertical scale is off on the lower and upper bound.
The two scale widget are handled exactly the same, except that QwtScaleDraw::Alignment is different. Spacings and Margins are 0, Scaling is linear.
The last lines of application code involved in the QwtScaleWidget-derived scale widgets are:
setScaleDiv(scaleTransformation, scaleEngine->divideScale(lowerBound, upperBound, nBigTicks, nSmallTicks);
scaleTransformation = new QwtScaleTransformation(QwtScaleTransformation::Linear);
setScaleDiv(scaleTransformation, scaleEngine->divideScale(lowerBound, upperBound, nBigTicks, nSmallTicks);
To copy to clipboard, switch view to plain text mode
The values passed there for lowerBound and upperBound are indeed correct (Example: -992.955, 217.5), but the resulting scale widget is not:
awerfearfgerg.jpg
(you can see the scale starts a ~190 and ends at ~960)
Any ideas on what to try?
Best Regards,
K.
Edit: I'm using Qt 4.8.0, but tried 4.8.6 too, should that matter...
Bookmarks