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
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
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.
thanks wysota
how can i clear all painting i have done with the painter.?
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.
Don't write a post just to thank someone, use "Thanks" button.
athulms (23rd August 2011)
Bookmarks