In a Qt4 application, is it possible to tell inside a paintEvent()
handler whether the repaint was triggered by a resize or not?
I have a widget which is very slow to redraw (a complicated plot), and I want to speed up resizes by just blitting a resized pixmap while the widget is being resized, and only redraw the widget when the resize is complete.
I've tried setting/unsetting a flag at the beginning and end of resizeEvent()
but that doesn't seem to work (i.e. the flag is always off in paintEvent()
).