Hm, your code uses the direct painter in the same cycle as the replot - there was a bug report indicating that the paint region of the replot gets swallowed by the internal pain event generated by the direct painter. Maybe this is the case in your application too ( don't see any obvious bug ). I would be interested in investigating in this issue - could you please upload a small compilable demo ?
For your type of application I would recommend to go with Qt4 ( not Qt5 ) enabling the X11 paintengine ( graphicssystem: native ). Only this way you might see hardware accelerated graphics and the direct painter is more effective as it doesn't need to send dummy paint events ( what probable are the reason for the issue above ).
Then initialize your canvas this way:
canvas->setAttribute( Qt::WA_PaintOutsidePaintEvent, true );
plot->setCanvas( canvas );
QwtPlotCanvas *canvas = new QwtPlotCanvas();
canvas->setPaintAttribute( QwtPlotCanvas::BackingStore, false );
canvas->setAttribute( Qt::WA_PaintOutsidePaintEvent, true );
plot->setCanvas( canvas );
To copy to clipboard, switch view to plain text mode
You could also play with:
canvas->setAttribute( Qt::WA_PaintOnScreen, true );
canvas->setAttribute( Qt::WA_NoSystemBackground, true );
canvas->setAttribute( Qt::WA_PaintOnScreen, true );
canvas->setAttribute( Qt::WA_NoSystemBackground, true );
To copy to clipboard, switch view to plain text mode
Uwe
Bookmarks