[Qt-interest] paint getting called continuously
lists4pghanghas
lists4pghanghas at gmail.com
Sun May 2 21:40:53 CEST 2010
I guess that was a bad day for me. Today I looked at the same prob again
and
there it was a small if test in paint that was supposed to fail most of
the time but due to
a logically error was getting executed everytime updating geometery.
Sorry guys. I think I should wait atleast for a day before posting on to
the list and wasting other people's time.
Thanks for all the precious time
PSG
On Wednesday 28 April 2010 07:18 PM, william.crocker at analog.com wrote:
>
> 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".
>>
>
>
> You are probably calling (directly or indirectly) update()
> at some point during the paint event, which is scheduling
> another paint event.
>
>
>
>> 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.
>>
>> 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.
>>>
>>>
>>
>>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
More information about the Qt-interest-old
mailing list