[vtkusers] Interacting with 2 QVtkWidgets at the same time

HansAusBremen hansausbremen at gmx.net
Mon Sep 26 05:56:15 EDT 2011


Thank you for the replies.
I get a compile-error with the code used in my program.

It sais:


> error C2664: "unsigned long vtkObject::AddObserver(unsigned long,
> vtkCommand *, float)": cannot convert parameter 2 from 'myclass *const' to
> 'vtkCommand *'
> 

and this is the code:


> QvtkWidget widget_3D_1;
> QvtkWidget widget_3D_2;
> 
> vtkRenderer* renderer1;
> vtkRenderer* renderer2;
> ...
> renderer1->ResetCamera();
> renderer2->ResetCamera();
> 
> renderer2->SetActiveCamera(renderer1->GetActiveCamera());
> ...
> widget_3D_1.GetRenderWindow()->AddRenderer(renderer1);
> widget_3D_2.GetRenderWindow()->AddRenderer(renderer2);
> ...
> this->widget_3D_1.GetRenderWindow()->AddObserver(vtkCommand::AnyEvent,
> this, &SimpleView::ModifiedHandler);
> 
> void myclass::ModifiedHandler()
> {
>    widget_3D_2.GetRenderWindow()->Render();
> }
> 

--
View this message in context: http://vtk.1045678.n5.nabble.com/Interacting-with-2-QVtkWidgets-at-the-same-time-tp4826045p4840807.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list