[PyQt] QGLWidget.renderText problem

V. Armando Sole sole at esrf.fr
Fri Sep 12 12:32:19 BST 2008


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()

Best regards,

Armando 




More information about the PyQt mailing list