osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->windowDecoration = false;
traits->x = x;
traits->y = y;
traits->width = w;
traits->height = h;
traits->doubleBuffer = true;
traits->samples = 8;
在窗口建立之前调用
return new osgQt::GraphicsWindowQt(traits.get(),parent)
或者
osg::ref_ptr< osg::DisplaySettings > displaySettings = new osg::DisplaySettings;
displaySettings->setNumMultiSamples(16);
this->setDisplaySettings( displaySettings.get());
在窗口建立之前调用