(Programs that don't use the soqtwidgetplugin are fine.)
Thanks in advance!
Martin Beizer
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Test2 w;
// Make a scene containing a red cone
SoSeparator *root = new SoSeparator;
SoPerspectiveCamera *myCamera = new SoPerspectiveCamera;
SoMaterial *myMaterial = new SoMaterial;
root->ref();
root->addChild(myCamera);
root->addChild(new SoDirectionalLight);
myMaterial->diffuseColor.setValue(1.0, 0.0, 0.0); // Red
root->addChild(myMaterial);
root->addChild(new SoCone);
SoQtRenderArea *viewer = w.ui.soqtwidgetplugin->getViewer();
// Make myCamera see everything.
myCamera->viewAll(root, viewer->getViewportRegion());
viewer->setSceneGraph(root);
viewer->setTitle("VisTool!");
w.ui.soqtwidgetplugin->show();
viewer->show();
w.show();
return a.exec();