From the screen shots alone it is hard to say anything useful. Could you create a small and compilable demo where I can debug the situation ?
Uwe
From the screen shots alone it is hard to say anything useful. Could you create a small and compilable demo where I can debug the situation ?
Uwe
Sure, see attachment (QwtPlotTest.zip). It includes a dialog class with a QwtPlot widget. When you run the example, resize the dialog by its right border. When the dialog is small enough, you'll see the problem.
As far as I can tell, the problem is that the scale (the x scale in this example) always displays the leftmost number. However, if the number does not fit anymore between the adjecting (minor) ticks, things start to get wrong. The space between the ticks is reduced, but since the leftmost number must still be displayed, the leftmost minor tick starts to move to the right. That is not wrong per se, but the data point is not moved along with the minor tick. Please note that the leftmost data point in my example is exactly the same value as the leftmost minor tick. So when the tick moves, the data point should move, too.
This error does not show when the scale engine attribute QwtScaleEngine::Floating is not set, but unfortunatly that is no option for us.
Uwe,
did you find something...?
It's a problem of a missing updates of the axes border distances not being called from QwtPlot::resizeEvent. Fixed in SVN ( all branches >= 6.1 ).
If you don't want to upgrade the following workaround can be done in application code:
UweQt Code:
virtual void YourPlot::updateLayout override { for ( int axisId = 0; axisId < axisCnt; axisId++ ) { if ( axisEnabled( axisId ) ) { int startDist, endDist; scaleWidget->getBorderDistHint( startDist, endDist ); scaleWidget->setBorderDist( startDist, endDist ); } } }To copy to clipboard, switch view to plain text mode
Crowley (27th March 2017)
Works perfectly, thanx. :-)
Bookmarks