This does not do anything of the kind of fixing bug. It just accepts the event to tell that event receiver is interested in listening to it, and ignore just ignores the event for any specific scenario.
You have little conversation output, and I have little understanding of QEvent.
But lets start to explain why the event should not be propagated to another widget, although there was no annotation or the mouseMode is not TextSelect? Alternatively: Which other widget would need right/middle clicks?
And why does mouseDoubleClickEvent() ignore() events and mouseWheelEvent() not? Is there anything special with double clicks?