[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: QOpenGLContext missing "functions" method?
From: Jason Hallen <hallenj () gmail ! com>
Date: 2024-03-01 13:59:32
Message-ID: CA+-0_dp12RJ8wmmtyuaqMZi0ZwUXQ0z_RQexg_vGUzH9JX1N0A () mail ! gmail ! com
[Download RAW message or body]
Perfect, that worked. Thanks!
Jason
On Thu, Feb 29, 2024 at 3:27 AM Phil Thompson <phil@riverbankcomputing.com>
wrote:
> On 29/02/2024 04:43, Jason Hallen wrote:
> > 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
> > <
> https://doc.qt.io/qtforpython-6/PySide6/QtGui/QOpenGLContext.html#PySide6.QtGui.PySide6.QtGui.QOpenGLContext.functions
>
> >
> > 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?
>
>
> https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtopengl/qopenglversionfunctionsfactory.html#
>
> Phil
>
[Attachment #3 (text/html)]
<div dir="ltr"><div>Perfect, that worked. Thanks!<br></div>Jason<br></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 29, 2024 at \
3:27 AM Phil Thompson <<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 29/02/2024 04:43, \
Jason Hallen wrote:<br> > Hello everyone,<br>
> <br>
> I'm trying to reimplement QOpenGLWidget in PyQt6 and have the following<br>
> code.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> *class OpenGLWidget(QOpenGLWidget): def __init__(self):<br>
> super().__init__() def initializeGL(self): context =<br>
> QtGui.QOpenGLContext.currentContext() functions =<br>
> context.functions()*<br>
> <br>
> However, I'm getting the following error when running the code.<br>
> <br>
> *AttributeError: 'QOpenGLContext' object has no attribute \
'functions'*<br> > <br>
> I looked in the source code at the QtGui.pyi file, and sure enough <br>
> there<br>
> isn't a "functions" method declared in the QOpenGLContext class \
despite <br> > the<br>
> fact that the documentation<br>
> <<a href="https://doc.qt.io/qtforpython-6/PySide6/QtGui/QOpenGLContext.html#PySide6.QtGui.PySide6.QtGui.QOpenGLContext.functions" \
rel="noreferrer" target="_blank">https://doc.qt.io/qtforpython-6/PySide6/QtGui/QOpenGLContext.html#PySide6.QtGui.PySide6.QtGui.QOpenGLContext.functions</a>><br>
> says it should be there.<br>
> <br>
> Can anyone help me understand what's going on? Am I misunderstanding<br>
> something, or is there a workaround I can use to access the OpenGL<br>
> functions?<br>
<br>
<a href="https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtopengl/qopenglversionfunctionsfactory.html#" \
rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/static/Docs/PyQt6/api/qtopengl/qopenglversionfunctionsfactory.html#</a><br>
<br>
Phil<br>
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic