QGLWidget::setContext: Context must refer to this widget
Hi gang,
I am trying to share QGLContext amongst different QGLWidgets and am getting an error on the second widget. The basic code is as follows :
commonContext = new QGLContext(QGLFormat(QGL::DoubleBuffer));
QGLWidget *w1 = new QGLWidget(commonContext, NULL )
QGLWidget *w2 = new QGLWidget(commonContext, NULL, w1 );
Any thoughts you might have is appreciated.
Freddy
Re: QGLWidget::setContext: Context must refer to this widget
might be you need to call QGLContext::create before passing it to the QGLWidgets...