When an opengl widget is laid out, it will adjust the glViewport for you automatically. Keep in mind that events like mouse coordinates are still relative to your size.
When an opengl widget is laid out, it will adjust the glViewport for you automatically. Keep in mind that events like mouse coordinates are still relative to your size.