The QPaintEvent class contains event parameters for paint events. More...
|CMake:||find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
|qmake:||QT += gui|
|QPaintEvent(const QRect &paintRect)|
|QPaintEvent(const QRegion &paintRegion)|
|const QRect &||rect() const|
|const QRegion &||region() const|
Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved.
The event contains a region() that needs to be updated, and a rect() that is the bounding rectangle of that region. Both are provided because many widgets cannot make much use of region(), and rect() can be much faster than region().boundingRect().
Painting is clipped to region() during the processing of a paint event. This clipping is performed by Qt's paint system and is independent of any clipping that may be applied to a QPainter used to draw on the paint device.
Constructs a paint event object with the rectangle that needs to be updated. The region is specified by paintRect.
Constructs a paint event object with the region that needs to be updated. The region is specified by paintRegion.
Returns the rectangle that needs to be updated.
Returns the region that needs to be updated.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: