[Qt-interest] paint getting called continuously

Sean Harmer sean.harmer at maps-technology.com
Wed Apr 28 15:33:55 CEST 2010


Hi,

On Wednesday 28 Apr 2010 14:20:10 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.

Nothing immediately obvious springs to mind. Can you reduce it down to a 
simple compilable example that still shows the problem and post it to the list 
please?

Cheers,

Sean

> 
> Thanks
> Pritam
> 
> On 4/28/10, Ramesh <ramesh.bs at robosoftin.com> wrote:
> > Yes,
> > paint will get called, repetedly... if u override the paint method of any
> > inherited base class..
> > 
> > -----Original Message-----
> > From: qt-interest-bounces at trolltech.com
> > [mailto:qt-interest-bounces at trolltech.com] On Behalf Of PGhanghas
> > Sent: Wednesday, April 28, 2010 2:21 PM
> > To: qt-interest at trolltech.com
> > Subject: [Qt-interest] paint getting called continuously
> > 
> > Hi
> > 
> > I have a QGV application. Application is simple, it uses some custom
> > classes subclassed from QGraphicsWidget.
> > But Its giving me strange behavior. paint of one of my custom widget is
> > getting called
> > continuously. I am using Qt 4.6.1. I am sure I am not changing geometry.
> > I understand that
> > it may be very difficult for some to diagnose a problem without any code
> > snippet. If I am not able to solve it in the mean time,
> > I will do that as well. Right now I am thinking has anyone else faced a
> > similar problem.
> > 
> > Thanks,
> > Pritam
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> > 
> > 
> > -----------------------------------------------
> > Robosoft Technologies - Come home to Technology
> > 
> > Disclaimer: This email may contain confidential material. If you were not
> > an intended recipient, please notify the sender and delete all copies.
> > Emails to and from our network may be logged and monitored. This email
> > and its attachments are scanned for virus by our scanners and are
> > believed to be safe. However, no warranty is given that this email is
> > free of malicious content or virus.



More information about the Qt-interest-old mailing list