PySide.QtGui.QPaintEvent class contains event parameters for paint events.
描绘事件会被发送给需要更新自身的 Widget,例如:当由于移动覆盖 Widget,而露给 Widget 的一部分时。
事件包含 PySide.QtGui.QPaintEvent.region() that needs to be updated, and a PySide.QtGui.QPaintEvent.rect() that is the bounding rectangle of that region. Both are provided because many widgets can't make much use of PySide.QtGui.QPaintEvent.region() ,和 PySide.QtGui.QPaintEvent.rect() can be much faster than PySide.QtGui.QPaintEvent.region() . boundingRect() .
描绘被裁剪到 PySide.QtGui.QPaintEvent.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 PySide.QtGui.QPainter 用于在描绘设备上绘制。
因此,返回值通过 QPainter.clipRegion() on a newly-constructed PySide.QtGui.QPainter 不会反映由描绘系统所使用的裁剪区域。
| 参数: |
|
|---|
构造描绘事件对象采用需要更新的矩形。区域的指定通过 paintRect .
构造描绘事件对象采用需要更新的区域。区域的指定通过 paintRegion .
| 返回类型: | PySide.QtCore.QRect |
|---|
返回需要被更新的矩形。
| 返回类型: | PySide.QtGui.QRegion |
|---|
返回需要被更新的区域。