PySide6.QtGui.QPaintEvent¶
- class QPaintEvent¶
The
QPaintEvent
class contains event parameters for paint events. More…Synopsis¶
Methods¶
def
__init__()
def
rect()
def
region()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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
paintEvent()
- __init__(arg__1)¶
- Parameters:
arg__1 –
QPaintEvent
- __init__(paintRect)
- Parameters:
paintRect –
QRect
Constructs a paint event object with the rectangle that needs to be updated. The region is specified by
paintRect
.- __init__(paintRegion)
- Parameters:
paintRegion –
QRegion
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.
See also
Returns the region that needs to be updated.
See also