Sorry, maybe I don't express my question clearly enough, now I will describe it again:
As I have mentioned in my first post: I am writing a widget, this widget must refresh all the area after a vertical resizing but only need to refresh the newly visible part after a horizontal resizing( a ruler widget may have the same behaviour).
1) If I don't set Qt::WA_StaticContents attribute to my widget, Qt will notify me to redraw the entire area of the widget after any kind of resizing. But in the case of horizontal resizing it will waste a lot time to redraw the unchanged part of my widget. I think this is not an effient way.
2) If I set Qt::WA_StaticContents attribute to my widget, Qt will only notify me to redraw the newly exposed part of my widget after resizing, but in the case of vertical resizing this will make me unable to redraw the entire widget.
It seems that I have to manually control which part of my widget need to be redrawn in resize event handler by comparing the old size and new size of my widget. I am interested in that is there an elegent way to let me control that by myself?
Thanks.
Bookmarks