PDA

View Full Version : Only paint on command



Morea
24th April 2006, 10:12
Hi.
I have a problem. If I switch windows ALT-TAB the program redraws, how can I make the program only redraw when I call a specific slot?
I have made a paintEvent method, but this get's called to often.

wysota
24th April 2006, 10:32
You can't. Paint event is called whenever a window is somehow obscured, you can't decide when will it be called.

Morea
24th April 2006, 10:38
But how can I solve it then? Should I have a boolean switch that tells if the paint event is an automatic one, or if it is a demand from the user?
That might work. I'll try that.
Thanks.

wysota
24th April 2006, 10:43
But why do you need such distinction in the first place?