[Qt-interest] paint getting called continuously

Andre Somers andre at familiesomers.nl
Wed Apr 28 15:27:50 CEST 2010


On 28-4-2010 15:20, Parta wrote:
> I understand that paint will get called if its overridden. That's the
> whole purpose of overriding the virtual. The problems is "its getting
> called continuously, almost consuming the whole cpu even when I am not
> doing anything with it".
> I just launch the application and sit back  and it keeps painting the
> same thing again and again. I know that because I can see debug
> messages from paint function. It shouldnt paint the same thing again
> and again unless there is any change (its shown again or its geometry
> changes or its repositioned or update is called). But I am not doing
> anything with it. Why does the paint event gets generated continously
> in the first place in that scenario. I asked just to confirm that I am
> not making some mistake  and breaking my head over something that is
> some common/known mistake. I am sure its a mistake somewhere in the
> way I have written it.
>    
Perhaps your are accidentally triggering a repaint from your paint 
implementation?

André



More information about the Qt-interest-old mailing list