Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QPaintEvent class contains event parameters for paint events. More...
#include <QPaintEvent>
Inherits QEvent.
The QPaintEvent class contains event parameters for paint events.
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 can't 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.
See also QPainter, QWidget::update(), QWidget::repaint(), and QWidget::paintEvent().
Constructs a paint event object with the region that needs to be updated. The region is specified by paintRegion.
Constructs a paint event object with the rectangle that needs to be updated. The region is specified by paintRect.
Returns the rectangle that needs to be updated.
See also region() and QPainter::setClipRect().
Returns the region that needs to be updated.
See also rect() and QPainter::setClipRegion().
Constructs a paint event object with both a paintRegion and a paintRect, both of which represent the area of the widget that needs to be updated.
Returns true if the paint event region (or rectangle) has been erased with the widget's background; otherwise returns false.
Qt 4 always erases regions that require painting. The exception to this rule is if the widget sets the Qt::WA_OpaquePaintEvent or Qt::WA_NoSystemBackground attributes. If either one of those attributes is set and the window system does not make use of subwidget alpha composition (currently X11 and Windows, but this may change), then the region is not erased.
Copyright © 2007 Trolltech | Trademarks | Qt 4.2.3 |