add: QGLFormat::setDefaultFormat(QGLFormat(QGL::DirectRendering | QGL::DoubleBuffer    | QGL::DepthBuffer     | QGL::Rgba            ));
context: int main( int argc, char **argv ){    // OSG init    osgInit(argc, argv);        // QT init    QApplication::setColorSpec( QApplication::CustomColor );    a = new QApplication( argc, argv );    if ( !QGLFormat::hasOpenGL() )    {        qWarning( "This system has no OpenGL support. Exiting." );        return -1;    }    // Create Windows        for(int i = 0; i < nwindows; ++i)    {        glWidgets[i] = new MyOSGQGLWidget();        QTWindowPtr win = QTWindow::create();        win->setGlWidget( glWidgets[i] );        // note: you can't share the scene between the windows, as the SSM        // adds it to his lightsource, and that can only be done for one        // node (single parent paradigm).        // If you want to do that, you have to manage the scene yourself        // without the SSM.        scene = makeTorus( .5, 2, 16, 16 );        glWidgets[i]->_manager.setWindow( win );        glWidgets[i]->_manager.setRoot( scene );        glWidgets[i]->_manager.showAll();        a->processEvents();        glWidgets[i]->show();    }    a->setMainWidget( glWidgets[0] );        return ( a->exec() );    // execute QT main loop}