Hi Jonathan, Is there a reason why you haven't considered using the new osgQt library, now part of the OpenSceneGraph-3.0 release? The osgviewerQt example illustrates it's usage.
Robert. On Wed, Sep 14, 2011 at 9:58 PM, Jonathan Klein <jonathan_kl...@web.de> wrote: > Hi, > > i'm writing a Qt Application, that should display a OSG Scene inside a > widget. I found some sample code and tried to use it as an Widget: > > http://pastebin.com/VJ45jUUN > > I have a ui-File to define the rest of the gui. Now i try to add my OsgWidget: > > Code: > > QtGui::QtGui(QWidget *parent, Qt::WFlags flags) > : QMainWindow(parent, flags) > { > ui.setupUi(this); > ViewerQOSG *osgView=new ViewerQOSG(ui.centralWidget); > osgView->setSceneData(GetRootNode()); > > ui.MainLayout->addWidget(osgView); > ui.MainLayout->addWidget(new QPushButton("bin knopf", > ui.centralWidget));// > } > > > > My problem is: The widget flickers and disappears sometimes. This happens > when I resize the window or if i rotate the scene with the mouse. > > I don't really understand everything from the code, i copied the most from > the sample. Any hints what i'm doing wrong? > > Thank you! > > Cheers, > Jonathan > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=42772#42772 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org