View.resizeGL

View.resizeGL(w, h)[source]

Resize the OpenGL canvas.

This implements the virtual funtion of the OpenGL widget. See the PySide2 docs 1 for more info.

To extend the behaviour of this function, you can implement resize().

Parameters
  • w (float) – The width of the canvas.

  • h (float) – The height of the canvas.

References

1

https://doc.qt.io/qtforpython-5.12/PySide2/QtWidgets/QOpenGLWidget.html#PySide2.QtWidgets.PySide2.QtWidgets.QOpenGLWidget.resizeGL