Hello friends,
is it possible to draw only changing rects in paintevent without loosing the rest of my unchanged paintings?
thx in adv
codeman
Hello friends,
is it possible to draw only changing rects in paintevent without loosing the rest of my unchanged paintings?
thx in adv
codeman
It depends on what exactly you are up to, but have a look at Qt::WA_OpaquePaintEvent.
Ok some details. I have subclass a widget and paint say 6 rects from top to bottom. so when I hover a specific rect region I update the icon of the rect.
And I want only paint this rect with the changed rect without loosing the other rect, where no changings are affected.
Ok, for that you could use Qt::WA_OpaquePaintEvent. Thus the image wont change. You have to calculate yourself which areas need an update. But be aware that calculating can cost much so that painting all could be faster. Also think about caching common parts using QPixmapCache.
Ok I try it thank you very much
Bookmarks