内容表

上一话题

QPaintDevice

下一话题

QPaintEngine

QPaintDeviceWindow

Convenience subclass of QWindow that is also a QPaintDevice . 更多

Inheritance diagram of PySide2.QtGui.QPaintDeviceWindow

继承者: QOpenGLWindow , QRasterWindow

概要

函数

虚函数

详细描述

QPaintDeviceWindow is like a regular QWindow , with the added functionality of being a paint device too. Whenever the content needs to be updated, the virtual paintEvent() function is called. Subclasses, that reimplement this function, can then simply open a QPainter on the window.

注意

此类不能直接被用于应用程序。它宁愿充当子类的基,像 QOpenGLWindow .

另请参阅

QOpenGLWindow

PySide2.QtGui.QPaintDeviceWindow. paintEvent ( event )
参数

event QPaintEvent

Handles paint events passed in the event 参数。

The default implementation does nothing. Reimplement this function to perform painting. If necessary, the dirty area is retrievable from the event .

PySide2.QtGui.QPaintDeviceWindow. update ( )

Marks the entire window as dirty and schedules a repaint.

注意

Subsequent calls to this function before the next paint event will get ignored.

注意

For non-exposed windows the update is deferred until the window becomes exposed again.

PySide2.QtGui.QPaintDeviceWindow. update ( rect )
参数

rect QRect

PySide2.QtGui.QPaintDeviceWindow. update ( region )
参数

region QRegion