Hi, 

I am trying to undock an from a QTabWidget: 


Code:
QWidget* gv = // here is the osgviewer widget (using Qt's OGLWidget)
QDialog* dlg = new QDialog(this); 
dlg->setWindowTitle("hello earth"); 
QHBoxLayout* pMainLay = new QHBoxLayout; 
gv->setMinimumSize(100,100); 
gv->setGeometry(100,100,300,300); 
pMainLay->addWidget(gv); 
dlg->setLayout(pMainLay); 
ui->tabWidget->removeTab(ui->tabWidget->currentIndex()); // removes the 
currently active tab 
dlg->show();

 

There is nothing to see in the new dialog. Did I missed something? 
How to "copy" the earth view properly into a new widget? Should I use a 
composite viewer for this kind of task? It seems there is not even the osg view 
visible (no blue canvas)... 

I also tried: 


Code:
QWidget* tab = ui->tabWidget->currentWidget(); 
tab->setParent(this); 
tab->setWindowFlags(Qt::Dialog); 
tab->setMinimumSize(400, 400); 
tab->setGeometry(100, 100, 500, 500); 
ui->tabWidget->removeTab(ui->tabWidget->currentIndex()); 
tab->show(); 




Everything works as expected when using standard QWidgets but the osg viewer is 
not shown.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=55761#55761





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to