From the
QWidget::paintEvent[
^] documentation:
Quote:
A paint event is a request to repaint all or part of a widget. It can happen for one of the following reasons:
repaint() or update() was invoked,
the widget was obscured and has now been uncovered, or
many other reasons.
So there may be many reasons why the widget (or portions of it) must be repainted (among the not mentioned ones above are resizing and moving of the window). If you are sure that this is not sourced by your code (e.g. by calling the widget's
repaint()
function instead of the
update()
function or perfoming other tasks that might trigger the paint event) you will have to live with the behaviour.
If you have performance issues, you should optimise your paint implementation (e.g. by updating only those portions that are covered by the passed region / rect).
If you really want to know what might be the cause of the events, you should also check the region / rect to see if only portions or the complete widget has to be updated and dig deep into the Qt sources.