Display different things in two different QGLWidget in Qt

Hi!

I’ve just added a second QGLWidget to my app (both QGLWidgets inherit from the same class). While the first one still works as expected, the second one raises a GL_OUT_OF_MEMORY, in the glDrawArrays() method of my paintGL()method, whatever the data which filled the buffers

I manage to solve this in adding the first QGLWidget as a “share widget” when creating the second one: QGLWidget Class | Qt 4.8

However, now, it seems that the two QGLWidgets are linked/synchronized (especially the camera but only when switching to a widget to another).

My question is thus more general as I would like to know how I should handle my two QGLWidgets, to avoid conflicts, knowing that they only share the same shaders code (vertex and fragment) but no data (they do not write/read the same buffers).

EDIT: I use PyQt4 and modern OpenGL