[vtkusers] Add vtkGraphLayoutview object to QvtkWidget

ankit lat ankitlat at gmail.com
Tue Jun 28 16:26:30 EDT 2011


I am trying to add a vtkGraphLayoutView into a QVTK widget so that I can
connect a custom vtk callback command to the QT signals and slots.
Specifically I need to add an observer to the annotation link to update
selections.
Previously I set up the callback with this code:

    selectionCallback = vtkSmartPointer<vtkCallbackCommand>::New();
    selectionCallback->SetClientData(this);
    selectionCallback->SetCallback (SelectionCallbackFunction);

graphLayoutView->GetRepresentation()->GetAnnotationLink()->AddObserver("AnnotationChangedEvent",
selectionCallback);

How would I add the GraphLayout View to a QTMainWindow and maintain the
ability to create custom callbacks as if it were a normal renderWindow?

Thanks
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110628/1818afb1/attachment.htm>


More information about the vtkusers mailing list