[PyQt] QGLWidget.renderText problem

Giovanni Bajo rasky at develer.com
Fri Sep 12 18:50:26 BST 2008

On 9/12/2008 1:32 PM, V. Armando Sole wrote:
> At 12:17 12/09/2008 +0200, Giovanni Bajo wrote:
>> On 9/12/2008 12:12 PM, V. Armando Sole wrote:
>>> Hello,
>>> QGLWidget.renderText gives me an OpenGL error for Qt versions >= 
>>> 4.3.0 that prevents any further OpenGL output.
>> Those are Qt bugs, not PyQt nor PyOpenGL bugs. Some of them have 
>> already been fixed and are in the process of being released. Check 
>> Trolltech's task tracker about it.
> Wrong. It is the new implementation of QGLWidget.renderText() confusing 
> PyOpenGL error checking:
> http://pyopengl.sourceforge.net/ctypes/using.html
> Just adding a method to the previous code solves the problem.
>     if qt.qVersion() >= '4.3.0':
>         def renderText(self,  x, y, z, text, font):
>             GL.glGetError()
>             qt.QGLWidget.renderText(self, x, y, z, text, font)
>             GL.glGetError()

This shows exactly that I am right and that this is a Qt bug. And it's 
already been fixed, as I said. I know because I have fixed myself this 
and other OpenGL compatibility bugs in Qt (specifically related to 

renderText() (like any other Qt function) shouldn't return and leave a 
GL error pending; this is the symptom you're seeing. The bug lies within 
the renderText() implementation which does a mistake so that it 
generates a GL error on specific video cards.
Giovanni Bajo
Develer S.r.l.

More information about the PyQt mailing list