QCustomPlot提示 “QOpenGLFramebufferObject::bind() called from incompatible context” 解决方法
在
void QCPPaintBufferGlFbo::draw(QCPPainter *painter) const
方法中的
painter->drawImage(0, 0, mGlFrameBuffer->toImage());
之前添加
if(QOpenGLContext::currentContext() != mGlContext.data()) {
mGlContext.data()->makeCurrent(mGlContext.data()->surface());
}