The QPaintEvent class contains event parameters for paint events. More...
#include <QPaintEvent>
Inherits: QEvent.
QPaintEvent ( const QRegion & paintRegion ) | |
QPaintEvent ( const QRect & paintRect ) | |
const QRect & | rect () const |
const QRegion & | region () const |
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. 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.
As a result, the value returned by QPainter::clipRegion() on a newly-constructed QPainter will not reflect the clip region that is used by the paint system.
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().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.