Starting with Qt4 it was not possible anymore ( beside for X11 graphics system, that is gone since Qt 5 ) to paint to a widget outside of a QWidget::paintEvent - because of how the Qt graphic stack is made. Of course this is the opposite of the idea of what QwtPlotDirectPainter is about. So this class is somehow doing things "against" how the Qt framework wants to have it.
So on platforms, where Qt::WA_PaintOutsidePaintEvent is not supported QwtPlotDirectPainter sends an paint event to itself, that is caught by a temporary event filter. The code in the event filter is then running in the paint event context Qt is expecting to be valid, when painting to a widget.
What your patch does is to disable the event filtering with the consequence, that the paint event goes in the normal event processing ( QwtPlotCanvas::paintEvent() ), where you run into a full repaint of the canvas. So the patch doesn't make too much sense as you would call canvas()->repaint() or probably QwtPlot::replot() for this.
Unfortunately I don't have a Mac myself, but I would guess, that the problem is related to incremental painting - not to where it happens. If this is the case I can imagine, that using QwtPlotDirectPainter::FullRepaint in combination with QwtPlotCanvas::BackingStore is the best option as you still paint incrementally ( to the backing store ), but the widget is always repainted in the context Qt is expecting it.
If you find out, that the problem is related to the fact, that rendering is done inside the event filter - not the paint event handler - you would at least have to implement some handling, that can identify the special type of paint event, where you simply have to draw some lines incrementally.
But maybe you find out more than "guessing", when debugging what i going on on your Mac.
Uwe
Bookmarks