--0000000000000d222606127de6f1 Content-Type: text/plain; charset="UTF-8" Hello everyone, I'm trying to reimplement QOpenGLWidget in PyQt6 and have the following code. *class OpenGLWidget(QOpenGLWidget): def __init__(self): super().__init__() def initializeGL(self): context = QtGui.QOpenGLContext.currentContext() functions = context.functions()* However, I'm getting the following error when running the code. *AttributeError: 'QOpenGLContext' object has no attribute 'functions'* I looked in the source code at the QtGui.pyi file, and sure enough there isn't a "functions" method declared in the QOpenGLContext class despite the fact that the documentation says it should be there. Can anyone help me understand what's going on? Am I misunderstanding something, or is there a workaround I can use to access the OpenGL functions? Thanks! Jason --0000000000000d222606127de6f1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,

I'm tryi= ng to reimplement QOpenGLWidget in PyQt6 and have the following code.
=

class OpenGLWidget(QOpenGLWidget):
=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 def __init__(self):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 super(= ).__init__()

=C2=A0 =C2=A0 def initializeGL(self):
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 context =3D QtGui.QOpenGLContext.currentContext()
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 functions =3D context.functions()

However, I'm getting the following error when running the code= .

AttributeError: 'QOpenGLContext' = object has no attribute 'functions'

=
I looked in the source code at the QtGui.pyi file, and sure enough the= re isn't a "functions" method declared in the QOpenGLContext = class despite the fact that the documentation says it should be there.

Can anyone help me understand what's going on? Am I misunderstand= ing something, or is there a workaround I can use to access the OpenGL func= tions?

Thanks!
Jason
--0000000000000d222606127de6f1--