Where is it safe to initialize OpenGL?
Reading the documentation for QOpenGLFunctions, the example provided there initializes OpenGL in the constructor of a class that inherits from QOpenGLFunctions and QWindow. In the OpenGL Window Example, however, initialization is done in the render function with a boolean to check if OpenGL has already been initialized.
Why is the example code doing initialization in render? Is it unsafe to initialize OpenGL in the constructor?