Hello,
I am following your example on embedding vtkplotter to Qt windows. The problem is that the interaction with the object using the mouse (in the example is a Cone) is not intuitive, here is what I mean by that:
Sorry if this is not clear. Is there an option to change that behavior in Qt to make the interaction similar to vtkplotter.
Thank you
Unfortunately when embedding in qt the key shortcuts are not active, still you can press t to switch interaction mode.
I have tried that but I don't see any difference. Let me give more details (even though I am sure that is very hard for me to describe it).
In the other hand, in vtkplotter itself when I run something vtkplotter filename.vtk the interaction using the mouse with the object is very user friendly.
Is it possible to change the behaviour in the vtk embeded in Qt?
Thank you
Yes - sorry, you are right .. in qt keys are completely disabled..
You can recover it with:
import vtk
# ...
vp += Cone()
vp.interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())
vp.show() # create renderer and add the actors
Exactly what I was looking for!!
Thank you very much
:1st_place_medal:
Hello, I suggest to add the line:
vp.interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())
in the examples. I struggled some times with the same strange behavior.
Thanks very much!
Yep!
you can also achieve the same with:
show(..., interactorStyle=0)
...OPS... it looks like there's a bug ... i'll fix that in the next release!
Thanks!