I am moving from Winpython3.4.3.7Qt4 to Winpython3.x.x.xQt5 (I tried a bunch of versions), and I am having the following problem:
The following minimal code (it does nothing usable, but demonstrates the error):
from PyQt5 import QtWidgets
import OpenGL.GL as gl
from PyQt5.QtOpenGL import QGLWidget
qapp = QtWidgets.QApplication([])
window = QGLWidget()
window.makeCurrent()
index = gl.glGenLists(1)
print(index)
runs on all my machines with Winpython3.4.3.7Qt4 and prints '1'. When I use Winpython3.x.x.xQt5, it does not run on my virtual machines anymore. The error I get is:
Traceback (most recent call last):
File ".\opengl.py", line 12, in <module>
index = gl.glGenLists(1)
File "C:\Winpython-64bit-3.6.7.0\python-3.6.7\lib\site-packages\OpenGL\platform\baseplatform.py", line 405, in __call__
return self( *args, **named )
File "C:\Winpython-64bit-3.6.7.0\python-3.6.7\lib\site-packages\OpenGL\error.py", line 232, in glCheckError
baseOperation = baseOperation,
OpenGL.error.GLError: GLError(
err = 1282,
description = b'invalid operation',
baseOperation = glGenLists,
cArguments = (1,),
result = 0
)
I have the feeling that window.makeCurrent() isn't coming through, but I have no idea why. What changed in that regard from Qt4 to Qt5?