c++ - OSGViewer in Qt's TabWidget -
i using openscenegraph 3.0.1 , having problem qt integration using the
osgqt::glwidget
when adding tab control during startup (inside constructor of main window.
mainwindow::mainwindow(qwidget* parent) : qmainwindow(parent), ui(new ui::mainwindow) { ui->setupui(this); qwidget* viewerwidget = new myviewerwidget(new osgviewer::viewer()); ui->tabwidget->addtab(viewerwidget, "my osg view"); // tab entry added nothing see empty osg window }
it works, when calling code menu after displaying main window:
void gcdrp::mainwindow::on_actioncreate_simulation_view_triggered() { qwidget* viewerwidget = new myviewerwidget(new osgviewer::viewer()); ui->tabwidget->addtab(viewerwidget, "my osg view"); // tab content visible (as expected) }
it seems scene graph screwed up. ideas?
works setminimumsize:
qwidget* viewerwidget = new myviewerwidget(new osgviewer::viewer()); viewerwidget->setminimumsize( ui->tabwidget->width(), ui->tabwidget->height());
Comments
Post a Comment