Usually you'd use QGLWidget::makeCurrent()