Commit c187fe52 authored by allens's avatar allens
Browse files

Added a comment about ownership and deletion

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27908 18c085ea-50e0-402c-830e-de6fd14e8384
parent fc7ba241
......@@ -69,7 +69,12 @@ public:
#else
glFormat.setAlpha(false);
#endif
// Create the VTK widget and force our custom render window into it.
// Create the VTK widget and force our custom render window
// into it.
// NOTE: vtkQtRenderWindow via the call to setCentralWidget()
// takes ownership of the gl widget pointer and deletes it at
// the appropriate time.
gl = new QVTKWidget2(glFormat, w);
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
......@@ -103,6 +108,9 @@ vtkQtRenderWindow::vtkQtRenderWindow(QWidget *parent, Qt::WindowFlags f) : QMain
setAnimated(false);
setWindowFlags(f);
// With the call to setCentralWidget() vtkQtRenderWindow takes
// ownership of the gl widget pointer and deletes it at the
// appropriate time.
setCentralWidget(d->gl);
}
......@@ -114,6 +122,9 @@ vtkQtRenderWindow::vtkQtRenderWindow(bool stereo, QWidget *parent, Qt::WindowFla
setAnimated(false);
setWindowFlags(f);
// With the call to setCentralWidget() vtkQtRenderWindow takes
// ownership of the gl widget pointer and deletes it at the
// appropriate time.
setCentralWidget(d->gl);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment