[vtkusers] QVTKWidget

Gib Bogle g.bogle at auckland.ac.nz
Wed Apr 21 19:22:04 EDT 2010


I've just discovered that my code for saving snapshots of my VTK scene is not in 
fact performing correctly.  The malfunction was easy to overlook.  I am creating 
an animation, which is rendered in a QVTWidget, and this all works fine.  I can 
also choose to write out each scene automatically to an image file.  I've just 
implemented the capability of pausing the animation, then saving the scene to an 
image file.  First I use a Qt QFileDialog to get the file name, then I save the 
image to that file.  After such a save only that part of the screen that falls 
within the rectangle that the dialog last occupied on the screen is now being 
used by VTK.  The dialog window has replaced the QVTKWidget window, in some 
sense.  This doesn't happen if I return from the image save method without doing 
anything, so it is some sort of interaction between the dialog, the widget, and 
the image saving code.  I can prevent this by ensuring that the VTK scene is not 
being displayed when I invoke the dialog (I switch to another screen).  This 
seems a bit clunky.  Is there another way to do this, one that doesn't involve 
hiding the QVTKWidget?  Perhaps a way to save and restore the QVTKWidget frame? 
  Thanks.



More information about the vtkusers mailing list