Thanks Eric.<div><br></div><div>I ended up doing something like this</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<QVTKInteractor> renderWindowInteractor = vtkSmartPointer<QVTKInteractor>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>renderWindowInteractor->SetRenderWindow(<b>(vtkContextView)</b>->GetRenderWindow());</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>renderWindowInteractor->Initialize();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><b>(QVTKWidget)</b>->SetRenderWindow(<b>(vtkContextView)</b>->GetRenderWindow());</div><div><br></div><div>since QVTKWidget requires a QVTKInteractor as the Interactor. I created a new QVTKInteractor, attached it as vtkContextView's interactor, and then just set the renderwindow from context view into the qvtkwidget.</div>
<div><br></div><div>(BTW, thanks to the guys developing the new chart classes, they look very nice! Especially in Paraview!)</div><div><br></div><br><div class="gmail_quote">On Wed, Apr 21, 2010 at 12:11 PM, Eric E. Monson <span dir="ltr"><<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
<br>
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:<br>
<br>
// Graph View needs to get my render window<br>
this->GraphView->SetInteractor(this->ui->vtkGraphViewWidget->GetInteractor());<br>
this->ui->vtkGraphViewWidget->SetRenderWindow(this->GraphView->GetRenderWindow());<br>
<br>
(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...)<br>
<br>
-Eric<br>
<br>
------------------------------------------------------<br>
<font color="#888888">Eric E Monson<br>
Duke Visualization Technology Group<br>
</font><div class="im"><br>
<br>
On Apr 21, 2010, at 12:28 PM, da wrote:<br>
<br>
> Hey everyone,<br>
><br>
> 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?<br>
><br>
><br>
</div><div class="im">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
</div><div class="im">> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
</div><div class="im">> Follow this link to subscribe/unsubscribe:<br>
</div><div><div></div><div class="h5">> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</div></div></blockquote></div><br></div>