QRasterWindow Class

QRasterWindow is a convenience class for using QPainter on a QWindow. More...

Header: #include <QRasterWindow>
qmake: QT += gui
Since: Qt 5.4
Inherits: QPaintDeviceWindow

Public Functions

QRasterWindow(QWindow *parent = nullptr)
virtual ~QRasterWindow()

Static Public Members

const QMetaObject staticMetaObject
  • 1 static public member inherited from QWindow
  • 9 static public members inherited from QObject

Additional Inherited Members

Detailed Description

QRasterWindow is a convenience class for using QPainter on a QWindow.

QRasterWindow is a QWindow with a raster-based, non-OpenGL surface. On top of the functionality offered by QWindow, QRasterWindow adds a virtual paintEvent() function and the possibility to open a QPainter on itself. The underlying paint engine will be the raster one, meaning that all drawing will happen on the CPU. For performing accelerated, OpenGL-based drawing, use QOpenGLWindow instead.

Internally the class is thin wrapper for QWindow and QBackingStore and is very similar to the Raster Window Example that uses these classes directly.

See also QPaintDeviceWindow::paintEvent() and QPaintDeviceWindow::update().

Member Function Documentation

QRasterWindow::QRasterWindow(QWindow *parent = nullptr)

Constructs a new QRasterWindow with parent.

[virtual] QRasterWindow::~QRasterWindow()

Destroys the instance of QRasterWindow. The destructor is virtual.

© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.12/qrasterwindow.html