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

例の動作
以下の手順でサンプルを実行できます。
- Qt Creator
Welcome モードを開き、Examples からこのサンプルを選択してください。詳細については、Qt Creator の「チュートリアル:ビルドと実行」を参照してください。
- Qt Extension for Visual Studio Code
Command Palette から `Qt: Open Qt examples ` コマンドを実行し、リストからこの例を選択します。詳細については、Qt Extension for Visual Studio Code の「チュートリアル: ビルドと実行」を参照してください。
OpenGL アクセラレーションの有効化
OpenGL アクセラレーション対応のシリーズを作成するには、通常のシリーズの場合と比較して、QAbstractSeries::useOpenGL プロパティをtrue に設定するだけです。
series->setUseOpenGL(true);これにより、チャートは透明な QOpenGLWidget をインスタンス化し、チャートの上にアクセラレーションされた系列を描画するために使用します。
注: OpenGLアクセラレーションは 、QLineSeriesおよびQScatterSeriesでのみサポートされています。
© 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.