Ya im confirm about that. Problem is coming when i do PixelBuffer makecurrent(). This is the piece of code whr im getting problem:
@
flushData()
{
pixelBuffer->makeCurrent();
glClearColor(0.5,0.5,0.5,255);
glClear(GL_COLOR_BUFFER_BIT);
}
@
Where pixelBuffer is the QGLPixelBuffer object.
And following where im initalizing my QGLWidget:
@
setWidget(QWidget* w)
{
if( QGLPixelBuffer::hasOpenGLPbuffers() )
{
QGLWidget* glw = qobject_cast<QGLWidget*>(w);
if( glw )
{
QGLFormatformat(QGL::Rgba|QGL::AlphaChannel,1);//
pixelBuffer = new QGLPixelBuffer(d->size, d->size,  format, glw);
    }
    else
        pixmap = new QPixmap(d->size, d->size);
}
else
    pixmap = new QPixmap(d->size, d->size);
// Now initialize the paint device
if(pixelBuffer)
{
    pixelBuffer->makeCurrent();
    glViewport(0, 0, d->size, d->size);
   glClearColor(0.5,0.5,0.5,255);
    glClear(GL_COLOR_BUFFER_BIT);
    textureId = pixelBuffer->generateDynamicTexture();
#ifndef Q_WS_X11
pixelBuffer->bindToDynamicTexture(textureId);
#else
pixelBuffer->updateDynamicTexture(textureId);
#endif
    ((QGLWidget*)(w))->makeCurrent();
    dataPaintDevice = pixelBuffer;
}
@
And one more thing that flushData() function if i call initially then no problem but after when start to read the data from the socket then problem ll rise.
Edit: please use @ tags to delimit code blocks to make it more readable [ZapB]