このページでは

OpenGL アクセラレーション対応のシリーズ例

このサンプルでは、QLineSeries および QScatterSeries で OpenGL アクセラレーションを有効にする方法を示しています。

複数のOpenGLチャートが積み重なった様子を示すスクリーンショット

例の動作

以下の手順でサンプルを実行できます。

OpenGL アクセラレーションの有効化

OpenGL アクセラレーション対応のシリーズを作成するには、通常のシリーズの場合と比較して、QAbstractSeries::useOpenGL プロパティをtrue に設定するだけです。

series->setUseOpenGL(true);

これにより、チャートは透明な QOpenGLWidget をインスタンス化し、チャートの上にアクセラレーションされた系列を描画するために使用します。

注: OpenGLアクセラレーションは 、QLineSeriesおよびQScatterSeriesでのみサポートされています。

サンプルプロジェクト @ code.qt.io

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