title: QOpenGLWidget makeCurrent() doesn't work
body: <p>I have a subclass of QOpenGLWidget that looks like this :</p>
  
  <pre><code>class MyWidget : public QOpenGLWidget
  { 
      ...
      virtual void initializeGL();
      virtual void resizeGL( int width, int height );
      virtual void paintGL();
  
      void SetWireframe( bool value );
  };
  </code></pre>
  
  <p>SetWireframe function is called by the main window when the checkbox is checked.</p>
  
  <p>From what I've understand, I need to make the context current before my GL functions calls if they are outside of initializeGL, resizeGL and paintGL.</p>
  
  <pre><code>void MyWidget::SetWireframe( bool value )
  {
      makeCurrent();
  
      if( value )
          glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
      else
          glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
  
      doneCurrent();
  }
  </code></pre>
  
  <p>Without makeCurrent(), glPolygonMode seems to act on the main window and not on my widget, but without this call nothing is done. How to make it work?</p>
  
  <p>( I use GLEW instead of QGLFunctions if that matters )</p>
  
  <p>Edit : When storing the value variable and setting wireframe state in paintGL(), it is working, but I'd like to make it work normally ( using SetWireframe ).</p>