From 9725ab222ffceb34b93af01631b273404ab784a9 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 28 Aug 2009 15:01:10 +0200 Subject: Doc: Added some information about the clipping applied in paint events. Task-number: 203483 Reviewed-by: Trust Me --- src/gui/kernel/qevent.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 9626193..8d98223 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -1080,8 +1080,17 @@ Qt::FocusReason QFocusEvent::reason() const 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(). + + \section1 Automatic Clipping + Painting is clipped to region() during the processing of a paint - event. + 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. \sa QPainter, QWidget::update(), QWidget::repaint(), QWidget::paintEvent() -- cgit v0.12