Hi Wagner, I figured it would... are you running under the same environment? I can only guess I must have something configured wrong. Does anyone have a clue how I might go about debugging this on my system? OpenGL works on my system. VTK works without Qt. Qt works without VTK. Could it be the latest version of Qt breaks VTK somehow?<br>
<br> Thanks,<br> -Joshua<br><br><div class="gmail_quote">On Thu, May 21, 2009 at 8:08 PM, Wagner Sales <span dir="ltr"><<a href="mailto:wsales@gmail.com">wsales@gmail.com</a>></span> wrote:<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 downloaded your code and compiled. To me, at least at first<br>
impression, works fine. I see the objects, change background, etc.<br>
<br>
Regards,<br>
<br>
Wagner<br>
<br>
<br>
<br>
2009/5/21 Joshua Pedrick <<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Ok, I guess I wasn't clear. I am using CentOS 5.2 64-bit. Qt sdk 2009.02 (Qt<br>
> v4.5.1). I've built VTK to include GUISupport and Qt support. I've tried to<br>
> replicate the GUI4 example. Using the GUI 4 example I get all the correct<br>
> behavior, including changing the background, but I can not see any 3D VTK<br>
> objects(cone or sphere) in the RenderWindows. I've the relevent source<br>
> files.<br>
><br>
> So, I was hoping for an example that actually worked or some advice as to<br>
> what I have done incorrectly.<br>
><br>
> Regards,<br>
> -Joshua<br>
><br>
><br>
> On Thu, May 21, 2009 at 10:16 AM, Clinton Stimpson <<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>><br>
> wrote:<br>
>><br>
>> There are examples in VTK/Examples/GUI/Qt.<br>
>> Both SimpleView/ and Events/ have designer .ui files.<br>
>><br>
>> Clint<br>
>><br>
>> Joshua Pedrick wrote:<br>
>>><br>
>>> Does anyone have a working example using QVTK + QtDesigner on Linux that<br>
>>> I could try to compare?<br>
>>><br>
>>> On Tue, May 12, 2009 at 1:16 PM, Joshua Pedrick <<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a><br>
>>> <mailto:<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a>>> wrote:<br>
>>><br>
>>> Hello again Leo,<br>
>>> Here's my code once again, but distilled and reordered a bit.<br>
>>> I removed all the Deletes and whatnot. I'm still not getting<br>
>>> anything but the gradient background. Any clues?<br>
>>> I downloaded and compiled VTK-5.4 with QVTK, using Qt version<br>
>>> 4.5.1 from Qt SDK 2009.02. Still no luck. So the latest VTK from<br>
>>> CVS and version 5.4 aren't working. I can't be the only one using<br>
>>> QVTK. I am not using cmake to build my project, could this be the<br>
>>> problem? Are there some compiler flags I need to set for QVTK to<br>
>>> work?<br>
>>><br>
>>><br>
>>> Regards,<br>
>>> -Joshua<br>
>>><br>
>>> void MainWindow::SetupScene()<br>
>>> {<br>
>>> QVTKWidget* qvtkwidget = ui.qvtkWidget;<br>
>>><br>
>>> qvtkwidget->GetRenderWindow()->DoubleBufferOff();<br>
>>><br>
>>><br>
>>> //Put cone in window<br>
>>> {<br>
>>> vtkConeSource *cone = vtkConeSource::New();<br>
>>><br>
>>> //Create Cone Mapper.<br>
>>> vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<br>
>>> coneMapper->SetInputConnection(cone->GetOutputPort());<br>
>>><br>
>>> //Create Cone Actor<br>
>>><br>
>>> vtkActor *coneActor = vtkActor::New();<br>
>>> coneActor->SetMapper(coneMapper);<br>
>>><br>
>>> //Create Cone Renderer<br>
>>> vtkRenderer *ren = vtkRenderer::New();<br>
>>> ren->SetBackground(0,0,0);<br>
>>> ren->SetBackground2(1,1,1);<br>
>>> ren->GradientBackgroundOn();<br>
>>><br>
>>> ren->AddActor(coneActor);<br>
>>><br>
>>> qvtkwidget->GetRenderWindow()->AddRenderer(ren);<br>
>>><br>
>>> }<br>
>>><br>
>>> }<br>
>>><br>
>>> 2009/5/12 L.J. van Ruijven <<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a><br>
>>> <mailto:<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>>><br>
>>><br>
>>> Hi Joshua,<br>
>>><br>
>>> I allready deleted your first mail, so I cannot check the code<br>
>>> again, but I think here the background renderer is added. So<br>
>>> that one is really drawn in the render window.<br>
>>> But if I remember well, you created the pipeline for the cone<br>
>>> in a separate fragment. And in the end of this fragment you<br>
>>> deleted the cone renderer, but you never added it to the<br>
>>> render window.<br>
>>><br>
>>> regards,<br>
>>><br>
>>> Leo.<br>
>>><br>
>>><br>
>>> ----- Original Message -----<br>
>>> From: Joshua Pedrick <<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a><br>
>>> <mailto:<a href="mailto:jpedrick@gmail.com">jpedrick@gmail.com</a>>><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> <mailto:<a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>><br>
>>> Cc: "L.J. van Ruijven" <<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a><br>
>>> <mailto:<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>>><br>
>>><br>
>>><br>
>>> > L.J. I think I do this in MainWindow::SetupScene() at the<br>
>>> very end:<br>
>>> ><br>
>>> > qvtkwidget->GetRenderWindow()->AddRenderer(ren);<br>
>>> > qvtkwidget->GetRenderWindow()->BordersOn();<br>
>>> ><br>
>>> > ren->Delete();<br>
>>> ><br>
>>> > Is this not the correct way to add a renderer? I do get the<br>
>>> lovely gradient<br>
>>> > background I applied to the renderer, but no actors. The<br>
>>> gradient background<br>
>>> > makes me think the renderer is properly connected to the<br>
>>> render window.<br>
>>> ><br>
>>> > I'm going to compile the stable version of VTK today and<br>
>>> see how it goes.<br>
>>> > I'm really suspecting there is a bug in the CVS QVTK.<br>
>>> ><br>
>>> > Regards<br>
>>> > -Joshua<br>
>>> ><br>
>>> > 2009/5/12 L.J. van Ruijven <<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a><br>
>>> <mailto:<a href="mailto:L.J.vanRuijven@amc.uva.nl">L.J.vanRuijven@amc.uva.nl</a>>><br>
>>> ><br>
>>> > > Hi Joshua,<br>
>>> > ><br>
>>> > > I think you forgot to connect the renderer to the<br>
>>> renderwindow. Somewhere<br>
>>> > > you should add the statement renWin->AddRenderer(ren).<br>
>>> > ><br>
>>> > > regards,<br>
>>> > ><br>
>>> > > Leo<br>
>>> > ><br>
>>> > ><br>
>>> > ><br>
>>> ><br>
>>><br>
>>><br>
>>><br>
>>> ------------------------------------------------------------------------<br>
>>><br>
>>> _______________________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the VTK FAQ at:<br>
>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br>