このページでは

QRasterWindow Class

QRasterWindow は、QWindow 上でQPainter を使用するための便利クラスです。詳細...

ヘッダー: #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は、ラスタベースの非OpenGLサーフェスを備えたQWindow です。QWindow が提供する機能に加え、QRasterWindowは仮想関数paintEvent()と、自身に対してQPainter を開く機能を追加しています。 基盤となる描画エンジンはラスタ方式となるため、すべての描画処理はCPU上で実行されます。OpenGLベースのアクセラレーションによる描画を行う場合は、代わりにQOpenGLWindow を使用してください。

内部的には、このクラスはQWindow およびQBackingStore の薄いラッパーであり、これらのクラスを直接使用する「Raster Window Example」と非常に似ています。

QPaintDeviceWindow::paintEvent() およびQPaintDeviceWindow::update()も参照してください 。

メンバ関数のドキュメント

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

parent を使用して、新しいQRasterWindowを作成します。

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