When QwtPlot::update() called(by resize, zoom/pan, setVisible) right before QwtPlotDirectPainter call,
QwtPlotDirectPainter goes through
if ( !immediatePaint )
and we get no repaint from earlier update() for canvas.
This leads to lost full-repaint event, and old canvas image.
Example result is in attach. I can reproduce this in several ways,
like resizing, QStackedWidget::setCurrentIndex, zoom/pan.
I found that i can detect that by overloading qwtplot::paintEvent, setting a flag in there,
and check it after QwtPlotDirectPainter is finished, then re-triggering full repaint.