<div dir="ltr"><div>Hi,<br><br></div>I am running into some problems trying to use the new QOpenGLWindow in Qt-5.4. The error is "AttributeError: 'QOpenGLContext' object has no attribute 'functions'". However, according to the documentation, QOpenGLContext should have such a function. Are the bindings not up to date or have I made another mistake? Here is the code:<br><div><br>import os<br>import sys<br><br>from PyQt5.QtGui import (QOpenGLWindow, QSurfaceFormat)<br>from PyQt5.QtWidgets import (QApplication,)<br><br>class MainWindow(QOpenGLWindow):<br>    def resizeGL(self, w, h):<br>        pass<br>    def paintGL(self):<br>        gl = self.context().functions()<br>        <br>        gl.glClearColor(1.0, 0.0, 0.0, 1.0)<br>        gl.glClear(gl.GL_COLOR_BUFFER_BIT | gl.GL_DEPTH_BUFFER_BIT)<br>        <br>if __name__ == '__main__':<br>    app = QApplication(sys.argv)<br>    <br>    format = QSurfaceFormat()<br>    format.setDepthBufferSize(24);<br>    format.setStencilBufferSize(8);<br>    format.setSamples(4)<br>    <br>    window = MainWindow()<br>    window.setTitle("Hello OpenGL")<br>    window.setFormat(format)<br>    window.resize(640, 480)<br>    window.show()<br>    <br>    sys.exit(app.exec_())<br><br></div><div>Thanks!<br></div><div>T.H.<br></div><div><br></div></div>