[vtkusers] Qt4 QMdiArea::addSubWindow() deletes VTK render window
    John Platt 
    jcplatt at dsl.pipex.com
       
    Tue Oct  2 05:22:54 EDT 2007
    
    
  
Hi all,
 
When I add a child window derived from QVTKWidget to a QMdiArea,
 
    QMdiSubWindow* mdiSubWindow = mdiArea->addSubWindow( mdiChild );
 
the VTK render window created in the mdiChild constructor
 
MdiChild::MdiChild()
{
    setAttribute(Qt::WA_DeleteOnClose);
    isUntitled = true;
 
    // QT/VTK interact
    ren = vtkRenderer::New();
    this->GetRenderWindow()->AddRenderer( ren );
}
 
is deleted when addSubWindow() returns.
 
Calling GetRenderWindow() again appears to fix the problem. 
 
I was wondering if anybody else using QMdiArea has had the same problem 
( Qt 4.3.1 open source edition, VTK 5.1, VS6, Win XP ).
 
TIA
 
John.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20071002/47e604c9/attachment.htm>
    
    
More information about the vtkusers
mailing list