<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>I looked at your code, it’s quite long and does a lot of things with classes I never used, so it’s complicating the thing (and I have not the time to look at the 45 min long video) :D</div><div><br></div><div>I was able to set up the vtkcontextView like this : <a href="https://gist.github.com/iMichka/9588898">https://gist.github.com/iMichka/9588898</a>, and it’s not crashing.</div><div><br></div><div>Some VERY important things :</div><div><br></div><div>- rename view to self.view … else it will be garbage collected at the end of the __init__, and will make the app segfault !</div><div>- you were setting <span style="white-space: pre-wrap;">vtk.vtkContextView() two times in the code, don’t do that, this also makes it crash.</span></div><div><span style="white-space: pre-wrap;">- </span><span style="white-space: pre-wrap;">self.iren.Start() is not needed, as explained in the first example in the VTK wiki</span></div><div><span style="white-space: pre-wrap;"><br></span></div><div><span style="white-space: pre-wrap;">Now you can try to adapt the new code to what you want to do. Perhaps go step by step, add the things you want to display first. Adding interactors and so can be done at the end.</span></div><div><span style="white-space: pre-wrap;">Keep it as simple as possible to have a minimal working example.</span></div><div><span style="white-space: pre-wrap;">If you come up with something I would be glad if you could share it, so we can have a new example in the wiki.</span></div><div><span style="white-space: pre-wrap;"><br></span></div><div><span style="white-space: pre-wrap;">Michka</span></div><div><br></div><div>P.S. try to keep the discussion on the mailing list.</div><br><div><div>On 14 mars 2014, at 06:55, Noeska Smit <<a href="mailto:N.N.Smit@tudelft.nl">N.N.Smit@tudelft.nl</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Thank you for you time! <div>I will keep trying things, I really hope it's just a simple hidden render call somewhere. I do have the feeling it's related to trying to use this vtkContextView with the QVTKRenderWindowInteractor, like maybe it can't handle that style of interaction. </div>

<div><br></div><div>Noeska</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 10:54 PM, Michka Popoff <span dir="ltr"><<a href="mailto:michkapopoff@gmail.com" target="_blank">michkapopoff@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">The OpenGL errors are exactly the ones I got, that’s why I wrote the new examples in the first place.<br>
This is new in VTK 6 as the OpenGL error pipeline was rewritten. What previously (in VTK 5) was allowed is now no more allowed.<br>
<br>
I even get segfaults when using your code on my Mac.<br>
The things is, there should be no call to Render() before the self.show() call. This is mandatory.<br>
<br>
A fast look at your code did not reveal where the render call could be, so I’ll have to investigate.<br>
There is one more thing, I never tried to work with vtkContext so I don’t know if there is a conflict with the QVTKRenderWindowInteractor.<br>
<br>
I’ll have a look at this this weekend so you may have to wait a little bit.<br>
<br>
<br>
Michka<br>
<div class=""><br>
On 13 mars 2014, at 22:14, Noeska Smit <<a href="mailto:noeska.smit@gmail.com">noeska.smit@gmail.com</a>> wrote:<br>
<br>
> Thank you for your fast reply, Michka. The first example does run here, so I<br>
> believe the problem is related to using the 2D API with Qt.<br>
><br>
> To double check this, I have rewritten that first example to include an<br>
> animated graph. A flurry of OpenGL errors start streaming and the animation<br>
> does not start. I can interact with the graph (pan and zoom) but I cannot<br>
> interact with the vertices to drag them around.<br>
><br>
> This is the OpenGL error:<br>
</div>> <<a href="http://vtk.1045678.n5.nabble.com/file/n5726307/opengl.png" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5726307/opengl.png</a>><br>
<div class="">><br>
> I have included the adjusted PyQt example here:  graphexample.py<br>
</div>> <<a href="http://vtk.1045678.n5.nabble.com/file/n5726307/graphexample.py" target="_blank">http://vtk.1045678.n5.nabble.com/file/n5726307/graphexample.py</a>><br>
<div class="im HOEnZb">><br>
><br>
> Michka Popoff wrote<br>
>> Hi,<br>
>><br>
>> QVTKWidget is not really tested I think, the preferred way is to use the<br>
>> QVTKRenderWindowInteractor.<br>
>><br>
>> There are two examples I wrote with the help of the people here on the<br>
>> list, and by refactoring some older code.<br>
>> I personally us the first one.<br>
>><br>
>> <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt</a><br>
><br>
><br>
><br>
><br>
><br>
</div><span class="HOEnZb"><font color="#888888">> --<br>
> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Interactive-graph-in-QVTKRenderWindowInteractor-VTK-6-1-Python-2-7-Pyside-tp5726303p5726307.html" target="_blank">http://vtk.1045678.n5.nabble.com/Interactive-graph-in-QVTKRenderWindowInteractor-VTK-6-1-Python-2-7-Pyside-tp5726303p5726307.html</a><br>


</font></span><div class="HOEnZb"><div class="h5">> Sent from the VTK - Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<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 <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: <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>
</div></div></blockquote></div><br></div></div>
</blockquote></div><br></body></html>