[vtkusers] How to get a vtkContextView into a QWidget?

Eric E. Monson emonson at cs.duke.edu
Wed Apr 21 15:11:10 EDT 2010


Hello,

As long as you are programming in C++ I think you can follow the examples in [vtksource]/Examples/Infovis/Cxx -- there they have things like EasyView that put a vtkGraphLayoutView into a QVTKWidget. I haven't tried this with the Charts specifically, but since vtkContextView is also a vtkRenderView, hopefully you can do the same thing:

  // Graph View needs to get my render window
  this->GraphView->SetInteractor(this->ui->vtkGraphViewWidget->GetInteractor());
  this->ui->vtkGraphViewWidget->SetRenderWindow(this->GraphView->GetRenderWindow());

(The reason I say that hopefully you're using C++ is that I can't get this to work with the Python wrappers and PyQt4...)

-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Apr 21, 2010, at 12:28 PM, da wrote:

> Hey everyone,
> 
> I've been playing around with the plotting functionality: first the older vtkQt* classes and now I'm looking at VTK/Charts classes. It seems that vtkContextView is an entire "view" in itself. How would I get this embedded into a QWidget? I've been using QVTKWidget previously but I don't think I can just put the renderer from the context view into the qvtkwidget?
> 
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list