PDA

View Full Version : how to call paintevent() only when repaint() is callled?



qt_user
2nd December 2010, 08:20
I have overloaded the paintEvent() function and I am calling it through repaint() when required. But, paintEvent() is also getting called when we refresh/update the window(by minimizing, maximizing the window,etc......) .How to avoid this?

nish
2nd December 2010, 09:30
widget->setupdatesEnabled()

wysota
2nd December 2010, 10:15
I have overloaded the paintEvent() function and I am calling it through repaint() when required. But, paintEvent() is also getting called when we refresh/update the window(by minimizing, maximizing the window,etc......) .How to avoid this?

Why do you want to avoid it?

zimang
2nd December 2010, 11:01
how about update() :confused: