PDA

View Full Version : Qpainter Help



athulms
23rd August 2011, 08:25
when i write a qpainter event. This event is continously called automatically till the application is closed. if i set some flags painting shows problem.how can i call qpainter on custom click only

wysota
23rd August 2011, 09:19
You can't. You have no influence on when the event is called. Your loop and crash comes from the fact that you incorrectly modify the state of the widget while in paint event which causes the event to be called again and again until you run out of memory and your app crashes.

athulms
23rd August 2011, 10:06
thanks wysota

athulms
23rd August 2011, 12:12
how can i clear all painting i have done with the painter.?

Rachol
23rd August 2011, 12:26
I have just answered to that question in a separate thread you have created. But when I think about PaintEvent, then just simply don't draw anything in it and it will be cleared usually.