QPaintDeviceWindow¶
Convenience subclass of
QWindow
that is also aQPaintDevice
. More…
Inherited by: QOpenGLWindow, QRasterWindow
Synopsis¶
Functions¶
Virtual functions¶
def
paintEvent
(event)
Slots¶
def
update
()
Detailed Description¶
QPaintDeviceWindow
is 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 aQPainter
on the window.Note
This class cannot directly be used in applications. It rather serves as a base for subclasses like
QOpenGLWindow
.See also
- class PySide2.QtGui.QPaintDeviceWindow¶
- PySide2.QtGui.QPaintDeviceWindow.paintEvent(event)¶
- Parameters:
event –
PySide2.QtGui.QPaintEvent
Handles paint events passed in the
event
parameter.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.
Note
Subsequent calls to this function before the next paint event will get ignored.
Note
For non-exposed windows the update is deferred until the window becomes exposed again.
- PySide2.QtGui.QPaintDeviceWindow.update(rect)
- Parameters:
rect –
PySide2.QtCore.QRect
- PySide2.QtGui.QPaintDeviceWindow.update(region)
- Parameters:
region –
PySide2.QtGui.QRegion
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.