• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QMoveEvent

    下一话题

    QFocusEvent

    QPaintEvent

    概要

    函数

    详细描述

    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 不会反映由描绘系统所使用的裁剪区域。

    class PySide.QtGui. QPaintEvent ( paintRect )
    class PySide.QtGui. QPaintEvent ( paintRegion )
    参数:

    构造描绘事件对象采用需要更新的矩形。区域的指定通过 paintRect .

    构造描绘事件对象采用需要更新的区域。区域的指定通过 paintRegion .

    PySide.QtGui.QPaintEvent. rect ( )
    返回类型: PySide.QtCore.QRect

    返回需要被更新的矩形。

    PySide.QtGui.QPaintEvent. region ( )
    返回类型: PySide.QtGui.QRegion

    返回需要被更新的区域。