[vtkusers] Using QVTKWidget

Joey Mukherjee joey at swri.edu
Tue Apr 26 16:53:50 EDT 2005


I usually use Motif as my GUI of choice, but I wanted to try Qt and the 
new QVTKWidget.  However, the interface seems to be very different than 
the Motif one.

For instance, in Motif, I create a

  _iren = vtkXRenderWindowInteractor::New ();

and then do a:

         extern XtAppContext application_context;
         ((vtkXRenderWindowInteractor *) _iren)->Initialize 
(application_context);
         _iren->Enable ();

and a new Window is drawn and I can interact with it.

On Qt, this interface does not seem to work.  Is there a better way of 
doing this in Qt?  What is unique (maybe) about what I do is I let VTK 
create the window for me.  I am not trying to embed the drawing into an 
existing application.  My main application is just the buttons of the 
interface, in both Qt and Motif.

Is there an example program that might show how to do this?  The reason 
why the existing ones do not help is that they all assume the window is 
embedded in the GUI.

Thanks,
Joey




More information about the vtkusers mailing list