In questa pagina

Esempio di serie con accelerazione OpenGL

L'esempio mostra come abilitare l'accelerazione OpenGL per QLineSeries e QScatterSeries.

Screenshot che mostra diversi grafici OpenGL sovrapposti

Esecuzione dell'esempio

È possibile eseguire l'esempio da:

Abilitazione dell’accelerazione OpenGL

Per creare una serie con accelerazione OpenGL, rispetto a una serie normale è sufficiente impostare la proprietà ` QAbstractSeries::useOpenGL ` su ` true`:

series->setUseOpenGL(true);

In questo modo il grafico istanzia un `QOpenGLWidget` trasparente che viene utilizzato per disegnare la serie accelerata sopra il grafico.

Nota: l’accelerazione OpenGL è supportata solo per QLineSeries e QScatterSeries.

Progetto di esempio su 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.