In questa pagina

QRasterWindow Class

QRasterWindow è una classe di utilità che consente di utilizzare QPainter su QWindow. Maggiori informazioni...

Intestazione: #include <QRasterWindow>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Eredita da: QPaintDeviceWindow

Funzioni pubbliche

QRasterWindow(QWindow *parent = nullptr)

Descrizione dettagliata

QRasterWindow è un'istanza di ` QWindow ` con una superficie rasterizzata, non basata su OpenGL. Oltre alle funzionalità offerte da ` QWindow`, `QRasterWindow` aggiunge una funzione virtuale ` paintEvent()` e la possibilità di aprire una finestra ` QPainter ` su se stessa. Il motore di disegno sottostante sarà quello raster, il che significa che tutto il disegno avverrà sulla CPU. Per eseguire un disegno accelerato basato su OpenGL, utilizzare invece QOpenGLWindow.

Internamente, la classe è un wrapper leggero per QWindow e QBackingStore ed è molto simile all’esempio Raster Window che utilizza direttamente queste classi.

Vedi anche QPaintDeviceWindow::paintEvent() e QPaintDeviceWindow::update().

Documentazione delle funzioni membro

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

Crea una nuova istanza di QRasterWindow con ` 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.