QPaintDeviceWindow Class

Convenience subclass of QWindow that is also a QPaintDevice. More...

Header: #include <QPaintDeviceWindow>
qmake: QT += gui
Since: Qt 5.4
Inherits: QWindow and QPaintDevice
Inherited By:

QOpenGLWindow and QRasterWindow

This class was introduced in Qt 5.4.

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.