Convenience subclass of
QWindowthat is also aQPaintDevice. 更多 …
继承者: QOpenGLWindow , QRasterWindow
QPaintDeviceWindowis like a regularQWindow, with the added functionality of being a paint device too. Whenever the content needs to be updated, the virtualpaintEvent()function is called. Subclasses, that reimplement this function, can then simply open aQPainteron the window.注意
此类不能直接被用于应用程序。它宁愿充当子类的基,像
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