QRasterWindow 类

QRasterWindow 是方便类为使用 QPainter QWindow . 更多...

头: #include <QRasterWindow>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
继承: QPaintDeviceWindow

公共函数

QRasterWindow (QWindow * parent = nullptr)

详细描述

QRasterWindow 是 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 代替。

Internally the class is thin wrapper for QWindow and QBackingStore and is very similar to the 光栅窗口范例 that uses these classes directly.

另请参阅 QPaintDeviceWindow::paintEvent () 和 QPaintDeviceWindow::update ().

成员函数文档编制

[explicit] QRasterWindow:: QRasterWindow ( QWindow * parent = nullptr)

构造新的 QRasterWindow 采用 parent .