I've subclassed QGLWidget to make my own OpenGL rendering context. I've been having wierd issues when testing the .exe on other computers, though, so I've tried to explicitly set the OpenGL version to 3.1 in the constructor:
On the line that says "error here", I'm getting the following:Code:
{ QGLFormat newFormat; newFormat.setVersion(3,1); glWidget::context()->setFormat(newFormat); //error here glWidget::setMouseTracking(true); }
I've tried rearranging it inside the constructor, but I'm always getting one error or another. I took the answer to this question as an example: http://stackoverflow.com/questions/5...get-at-runtimeCode:
C:\Qt\qtcreator-2.5.2\project\1KEdit\glwidget.cpp:15: error: C2662: 'QGLContext::setFormat' : cannot convert 'this' pointer from 'const QGLContext' to 'QGLContext &'
How do I properly use setFormat?