QGLWidget has no knowledge of what you are adding to the scene. You need to reposition your camera manually or use an object oriented approach to OpenGL such as Qt3D that will do some of the things for you.