QPaintEvent¶
The
QPaintEvent
class contains event parameters for paint events. More…
Synopsis¶
Functions¶
Detailed Description¶
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 arect()
that is the bounding rectangle of that region. Both are provided because many widgets cannot make much use ofregion()
, andrect()
can be much faster thanregion()
.boundingRect().
Automatic Clipping¶
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 aQPainter
used to draw on the paint device.As a result, the value returned by
clipRegion()
on a newly-constructedQPainter
will not reflect the clip region that is used by the paint system.See also
QPainter
update()
repaint()
paintEvent()
- class PySide2.QtGui.QPaintEvent(paintRect)¶
PySide2.QtGui.QPaintEvent(paintRegion)
- Parameters:
paintRect –
PySide2.QtCore.QRect
paintRegion –
PySide2.QtGui.QRegion
- PySide2.QtGui.QPaintEvent.rect()¶
- Return type:
Returns the rectangle that needs to be updated.
See also
- PySide2.QtGui.QPaintEvent.region()¶
- Return type:
Returns the region that needs to be updated.
See also
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.