QCustomPlot Discussion and Comments

QCP 2.0 beta and setOpenglReturn to overview

I'm trying to add OpenGL in plot-examples. First of all I include the line DEFINES += QCUSTOMPLOT_USE_OPENGL in the plot-examples.pro and then set customPlot->setOpenGl(true); in function. But I get errors like these at the step of building:
1-D:\MyFiles\QCustomPlot\qcustomplot\qcustomplot.cpp:909: error: undefined reference to `_imp__glClearColor@16'
2-D:\MyFiles\QCustomPlot\qcustomplot\qcustomplot.cpp:910: error: undefined reference to `_imp__glClear@4'


this is just an idea.. try to link against OpenGL32.lib

I have the exact same problem

Try these changes for Qt 5:
1. add "#include <QOpenGLFunctions>" in qcostumplot.h.
2. Modify the definition of QCPPaintBufferGlFbo,that is to say,
class QCP_LIB_DECL QCPPaintBufferGlFbo : public QCPAbstractPaintBuffer, protected QOpenGLFunctions
3. add "initializeOpenGLFunctions();" in QCPPaintBufferGlFbo constructor.

Do you have
QT += printsupport

in the .pro file ?

Ps. If you add it. remember to run qmake.