Nesta página

QRasterWindow Class

QRasterWindow é uma classe de conveniência para utilizar o ` QPainter ` em um ` QWindow`. Mais...

Cabeçalho: #include <QRasterWindow>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Herdado de: QPaintDeviceWindow

Funções públicas

QRasterWindow(QWindow *parent = nullptr)

Descrição detalhada

QRasterWindow é uma janela de tela ( QWindow ) com uma superfície baseada em raster, não OpenGL. Além das funcionalidades oferecidas por QWindow, a QRasterWindow adiciona uma função virtual paintEvent() e a possibilidade de abrir um QPainter sobre si mesma. O mecanismo de pintura subjacente será o raster, o que significa que todo o desenho ocorrerá na CPU. Para realizar desenho acelerado baseado em OpenGL, use QOpenGLWindow em vez disso.

Internamente, a classe é um invólucro leve para QWindow e QBackingStore e é muito semelhante ao Exemplo de Janela Raster, que utiliza essas classes diretamente.

Veja também QPaintDeviceWindow::paintEvent() e QPaintDeviceWindow::update().

Documentação das funções-membro

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

Cria uma nova instância de `QRasterWindow` com ` parent`.

© 2026 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.