Hello again Leo,<br>     Here&#39;s my code once again, but distilled and reordered a bit. I removed all the Deletes and whatnot. I&#39;m still not getting anything but the gradient background. Any clues? <br>     I downloaded and compiled VTK-5.4 with QVTK, using Qt version 4.5.1 from Qt SDK 2009.02. Still no luck. So the latest VTK from CVS and version 5.4 aren&#39;t working. I can&#39;t be the only one using QVTK. I am not using cmake to build my project, could this be the problem? Are there some compiler flags I need to set for QVTK to work?<br>
<br>     Regards,<br>       -Joshua<br><br>void MainWindow::SetupScene()<br>{<br>    QVTKWidget* qvtkwidget = ui.qvtkWidget;<br><br>    qvtkwidget-&gt;GetRenderWindow()-&gt;DoubleBufferOff();<br><br>    //Put cone in window<br>
    {<br>        vtkConeSource *cone = vtkConeSource::New();<br><br>        //Create Cone Mapper.<br>        vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<br>        coneMapper-&gt;SetInputConnection(cone-&gt;GetOutputPort());<br>
<br>        //Create Cone Actor<br>        vtkActor *coneActor = vtkActor::New();<br>        coneActor-&gt;SetMapper(coneMapper);<br><br>        //Create Cone Renderer<br>        vtkRenderer *ren = vtkRenderer::New();<br>
        ren-&gt;SetBackground(0,0,0);<br>        ren-&gt;SetBackground2(1,1,1);<br>        ren-&gt;GradientBackgroundOn();<br><br>        ren-&gt;AddActor(coneActor);<br><br>        qvtkwidget-&gt;GetRenderWindow()-&gt;AddRenderer(ren);<br>
    }<br><br>}<br><br><div class="gmail_quote">2009/5/12 L.J. van Ruijven <span dir="ltr">&lt;<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Joshua,<br>
<br>
I allready deleted your first mail, so I cannot check the code again, but I think here the background renderer is added. So that one is really drawn in the render window.<br>
But if I remember well, you created the pipeline for the cone in a separate fragment. And in the end of this fragment you deleted the cone renderer, but you never added it to the render window.<br>
<br>
regards,<br>
<br>
Leo.<br>
<div><div></div><div class="h5"><br>
<br>
----- Original Message -----<br>
From: Joshua Pedrick &lt;<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a>&gt;<br>
Date: Tuesday, May 12, 2009 3:36 pm<br>
Subject: Re: Trouble with QVTK<br>
To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
Cc: &quot;L.J. van Ruijven&quot; &lt;<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>&gt;<br>
<br>
<br>
&gt; L.J. I think I do this in MainWindow::SetupScene() at the very end:<br>
&gt;<br>
&gt;                 qvtkwidget-&gt;GetRenderWindow()-&gt;AddRenderer(ren);<br>
&gt;                 qvtkwidget-&gt;GetRenderWindow()-&gt;BordersOn();<br>
&gt;<br>
&gt;                 ren-&gt;Delete();<br>
&gt;<br>
&gt;  Is this not the correct way to add a renderer? I do get the lovely gradient<br>
&gt;  background I applied to the renderer, but no actors. The gradient background<br>
&gt;  makes me think the renderer is properly connected to the render window.<br>
&gt;<br>
&gt;  I&#39;m going to compile the stable version of VTK today and see how it goes.<br>
&gt;  I&#39;m really suspecting there is a bug in the CVS QVTK.<br>
&gt;<br>
&gt;               Regards<br>
&gt;                    -Joshua<br>
&gt;<br>
&gt;  2009/5/12 L.J. van Ruijven &lt;<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>&gt;<br>
&gt;<br>
&gt;  &gt; Hi Joshua,<br>
&gt;  &gt;<br>
&gt;  &gt; I think you forgot to connect the renderer to the renderwindow. Somewhere<br>
&gt;  &gt; you should add the statement renWin-&gt;AddRenderer(ren).<br>
&gt;  &gt;<br>
&gt;  &gt; regards,<br>
&gt;  &gt;<br>
&gt;  &gt; Leo<br>
&gt;  &gt;<br>
&gt;  &gt;<br>
&gt;  &gt;<br>
&gt;<br>
</div></div></blockquote></div><br>