I think if you wanted to imitate that, you'd need to copy from the FBO texture
(which replaces the front/back buffer here IIRC) to a square texture, using the
same coordinates. (And use that square texture to draw the screen -
there should be no need to use a square FBO)
Note that copying from texture to texture in OpenGL (other than 4.3) us a major PITA
(You need to draw it to screen and copy from that).
But I think you could use glCopyTexSubImage2D with the FBO's attachment
given to glReadBuffer (but we're using FBO through extension as it's not
a part of GL2 - which is why I'm not 100% sure it will work)
You'd need to get attachment from GL handle of the FBO -
Qt doesn't expose it. So you need to get GL handle from QGLFramebufferObject
Note that this might still be a major PITA because AFAIK there are 2 GL extensions
Qt might be using depending on machine (EXT and ARB_framebuffer_object) and the functions differ.
A different way (and possibly easier to implement?)
way would be to "stretch" the texture coordinates so that
the texcoord values that would map to the bounds of the copied image data
with the square texture in old code would map to bounds of the non-rect texture that
is being used instead in the new code (i.e. to [0,0]-[1,1])
(Just came to my mind, not 100% sure if this is exactly how to do it)
Only if you do this (alternative) and end up with artifacts:
Note that you'd probably end up with some coords outside the [0,0]-[1,1] range,
which might end up repeating the texture weirdly over parts of the screen.
so you might need to use the clampToEdge texture parameter. If still a mess, you might
need to use a fully transparent black (even 1-pixel) on the texture.