[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 &lt;<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt; \
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> &gt; Hello everyone,<br>
&gt; <br>
&gt; I&#39;m trying to reimplement QOpenGLWidget in PyQt6 and have the following<br>
&gt; code.<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; *class OpenGLWidget(QOpenGLWidget):            def __init__(self):<br>
&gt; super().__init__()      def initializeGL(self):            context =<br>
&gt; QtGui.QOpenGLContext.currentContext()            functions =<br>
&gt; context.functions()*<br>
&gt; <br>
&gt; However, I&#39;m getting the following error when running the code.<br>
&gt; <br>
&gt; *AttributeError: &#39;QOpenGLContext&#39; object has no attribute \
&#39;functions&#39;*<br> &gt; <br>
&gt; I looked in the source code at the QtGui.pyi file, and sure enough <br>
&gt; there<br>
&gt; isn&#39;t a &quot;functions&quot; method declared in the QOpenGLContext class \
despite <br> &gt; the<br>
&gt; fact that the documentation<br>
&gt; &lt;<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>&gt;<br>
 &gt; says it should be there.<br>
&gt; <br>
&gt; Can anyone help me understand what&#39;s going on? Am I misunderstanding<br>
&gt; something, or is there a workaround I can use to access the OpenGL<br>
&gt; 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