The QPaintEvent class contains event parameters for paint 事件。 更多...
继承 QEvent .
The QPaintEvent class contains event parameters for paint 事件。
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.
事件包含 region () that needs to be updated, 和 rect () that is the bounding rectangle of that region. Both are provided because many widgets can't make much use of region (),和 rect () 可以更快相较 region ().boundingRect().
描绘被裁剪到 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 用于在描绘设备上绘制。
因此,返回值通过 QPainter.clipRegion () on a newly-constructed QPainter will not reflect the clip region that is used by the paint system.
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 .
返回需要被更新的矩形。
另请参阅 region () and QPainter.setClipRect ().
返回需要被更新的区域。
另请参阅 rect () 和 QPainter.setClipRegion ().