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

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

例の実行

から例を実行するには Qt Creatorからサンプルを実行するには、Welcome モードを開き、Examples からサンプルを選択します。詳細については、Building and Running an Exampleを参照してください。

OpenGLアクセラレーションを有効にする

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

series->setUseOpenGL(true);

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

注意: OpenGLアクセラレーションは、QLineSeriesQScatterSeries に対してのみサポートされています。

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

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