QPaintEvent露

The QPaintEvent class contains event parameters for paint events. More鈥�

Inheritance diagram of PySide2.QtGui.QPaintEvent

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 a rect() that is the bounding rectangle of that region. Both are provided because many widgets cannot make much use of region() , and rect() can be much faster than region() .boundingRect().

Automatic Clipping露

Painting is clipped to region() during the processing of a paint event. This clipping is performed by Qt鈥檚 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 clipRegion() on a newly-constructed QPainter 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:
PySide2.QtGui.QPaintEvent.rect()露
Return type:

PySide2.QtCore.QRect

Returns the rectangle that needs to be updated.

PySide2.QtGui.QPaintEvent.region()露
Return type:

PySide2.QtGui.QRegion

Returns the region that needs to be updated.