OpenGL buffering problem on Optimus based GK107GLM

Hi I’ve got a problem with using QT OpenGL code with a particular nvidia card. The code works on Intel cards and it works on some desktop nvidia cards, but it does not work on the Optimus based GK107GLM [Quadro K1100M] (rev a1).
I’ve got multiple QGLWidgets doing native OpenGL rendering. They are visible when the user clicks on them, but there is only one at a time visible on the screen. On another widget I’ve got a “preview” screen of these widget, where I every now and then do a grabFramebuffer() on those QGLWidgets and paint that picture it this preview window.
With the nvidia Optimus card, the grabFramebuffer() method does not return the actual content of the framebuffer of the particular QGLWdigets, but instead it returns me the last viewed on screen framebuffer. I’m not sure if this has anything to do with the Optimus architecture, but I guess so. I have tried to do a glRead() and select the front/back buffer explicitly (I use double buffering), but it does not make much of a difference. It seems I can only ever view what has been the latest on screen framebuffer.
Can anyone help with this issue? I was wondering, if perhaps I’m always trying to read the buffer of the integrated graphics card, or something like this? Has anyone else ever experienced these issues? Any help would be greatly appreciated. I use Linux kernel 3.19 and nvidia driver 352.21.
I do not have this problem with the nouvea driver, btw. So it must be a problem specific to the nvidia driver or its OpenGL libraries.