I tried using OpenGL and got this error: void QCustomPlot::setOpenGl(bool, int) QCustomPlot can't use OpenGL because QCUSTOMPLOT_USE_OPENGL was not defined during compilation (add 'DEFINES += QCUSTOMPLOT_USE_OPENGL' to your qmake .pro file)

When I added this line to my .pro file, I got this error: qcustomplot.h:77:14: fatal error: QOpenGLFramebufferObject: No such file or directory
77 | # include <QOpenGLFramebufferObject>

I had to make these changes to get my application to build:

--- a/qcustomplot.h
+++ b/qcustomplot.h
@@ -74,8 +74,8 @@
 #  if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
 #    include <QtGui/QOpenGLFramebufferObject>
 #  else
-#    include <QOpenGLFramebufferObject>
-#    include <QOpenGLPaintDevice>
+#    include <QtOpenGL/QOpenGLFramebufferObject>
+#    include <QtOpenGL/QOpenGLPaintDevice>
 #  endif
 #  ifdef QCP_OPENGL_OFFSCREENSURFACE
 #    include <QtGui/QOffscreenSurface>

+++ b/gtrader.pro
@@ -1,12 +1,14 @@
-QT       += core gui
+QT       += core gui opengl