Have you tried calling grabFramebuffer()?

The docs say that QOpenGLWidget internally renders to an off-screen FBO. So my guess is that where you're calling glReadPixels(), that FBO is just not...