In the paint event you have all the information you need.
const QRect & QPaintEvent::rect () const
Returns the rectangle that should be updated.
See also region() and QPainter::setClipRect().
Examples: life/life.cpp, qfd/fontdisplayer.cpp, showimg/showimg.cpp, t10/cannon.cpp, t11/cannon.cpp, t13/cannon.cpp, and tooltip/tooltip.cpp.
const QRegion & QPaintEvent::region () const
Returns the region that should be updated.
See also rect() and QPainter::setClipRegion().
Examples: qfd/fontdisplayer.cpp and scribble/scribble.cpp.
Bookmarks