QPaintDeviceWindow

Convenience subclass of QWindow that is also a QPaintDevice . More

Inheritance diagram of PySide6.QtGui.QPaintDeviceWindow

Inherited by: QOpenGLWindow, QRasterWindow

Synopsis

Functions

Slots

Detailed Description

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.

Note

This class cannot directly be used in applications. It rather serves as a base for subclasses like QOpenGLWindow .

See also

QOpenGLWindow

class PySide6.QtGui.QPaintDeviceWindow
PySide6.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.

PySide6.QtGui.QPaintDeviceWindow.update(rect)
Parameters

rectPySide6.QtCore.QRect

Marks the rect of the window as dirty and schedules a repaint.

Note

Subsequent calls to this function before the next paint event will get ignored, but rect is added to the region to update.

Note

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

PySide6.QtGui.QPaintDeviceWindow.update(region)
Parameters

regionPySide6.QtGui.QRegion

Marks the region of the window as dirty and schedules a repaint.

Note

Subsequent calls to this function before the next paint event will get ignored, but region is added to the region to update.

Note

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