[vtkusers] QT and the vtkRenderwindow crash

Doug Hoppes dhoppes at mbfbioscience.com
Thu Jun 26 11:14:17 EDT 2014


Hi all,

                I'm not sure what's going on.  I have a class called VTKRenderingArea that is sub-classed from QVTKWidget.  On my QT window, I have placed a QWidget to put the VTK window at a specific location and made sure that it was promoted to VTKRenderingArea.  Everything compiles and links fine.

                When I run my application, I run into a crash in QVTKWidget.cxx:

    if (!this->mRenWin)
    {
      // create a default vtk window
      vtkRenderWindow* win = vtkRenderWindow::New();
      this->SetRenderWindow(win);
      win->Delete();
    }

      When debugging the code, I see that the *win is null and, hence, the crash.  Is there something that I need to do to instantiate the vtkrenderwindow?  The VTKRenderingArea is a valid pointer but I have noticed that the QVTKPaintEngine is an uninitialized pointer.

Doug

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140626/d8737c98/attachment.html>


More information about the vtkusers mailing list