PDA

View Full Version : PaintEvents() don't erase content before call



sagirahmed
12th October 2010, 05:03
Hi,

I want to create an application and want to draw some object on widget without repainting whole screen. I want call a function just like paintEvent() to draw some object on screen. Every time paintEvent is call and erase the screen(I don't want to erase the screen). I want to retain the screen as I draw at first and want to make update on screen.

Thanks & Regards

tbscope
12th October 2010, 05:43
What is your question please?

sagirahmed
12th October 2010, 06:28
Hi,

Every time widget paintEvent is called, Before calling paintevent it erase the content on screen automatically. I want to remove this hassle to draw object again and again. Only some portion of window will be repaint not whole window will be repaint.

tbscope
12th October 2010, 06:44
Use the PaintEvent::region() to get a region you need to update.
You can set that region when calling repaint() for example.