Add an extra widget so that the QGLWidget can be reparented successfully...

....