Brenno
Brenno

Reputation: 11

How to close automatically a opened vtk's window?

How to avoid that vtk's renderization window appears? What happens is that I use the widget from QVTKWidget and because it i don't need anymore the window created from vtk to rendering the image but I can't to cut some points where I think this window will disappear because it influences on the image that widget loads. I already tried somethings like use vtkobject destructors like Delete() and method to clear the vtkRenderWindowInteractor like SetRenderWindow(NULL) but none of them works. To simplifying, how to close automatically a opened vtk window?

Snapshot

*"Rendering Window" is the window created by vtk and behind it "Application" is the window from my application.

*"Rendering Window" only will be closed when "Application" ends.

Upvotes: 1

Views: 993

Answers (2)

doumx
doumx

Reputation: 11

Under MS Windows, vtkRenderWindow::Finalize() works for me...

Upvotes: 1

Marcus D. Hanwell
Marcus D. Hanwell

Reputation: 6855

The QVTKWidget is derived from a QWidget, and you should use the standard methods Qt makes available. When using the QVTKWidget you are actually using Qt's event loop. Did you try calling close on the QVTKWidget?

Upvotes: 0

Related Questions