<div dir="ltr"><div class="markdown-here-wrapper" style="font-family:"Lucida Sans",Cantarell,Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi Ignacio,</p>
<p style="margin:0px 0px 1.2em!important">I totally overlooked that you are using VTK 6.2.<br>As Shawn pointed out, VTK gained better Qt5 support with QVTKOpenGLWidget which was added in 8.0.</p>
<p style="margin:0px 0px 1.2em!important">Hth,<br>Sankhesh</p>
<div title="MDH:SGkgSWduYWNpbyw8ZGl2Pjxicj48L2Rpdj48ZGl2PkkgdG90YWxseSBvdmVybG9va2VkIHRoYXQg
eW91IGFyZSB1c2luZyBWVEsgNi4yLjwvZGl2PjxkaXY+QXMgU2hhd24gcG9pbnRlZCBvdXQsIFZU
SyBnYWluZWQgYmV0dGVyIFF0NSBzdXBwb3J0IHdpdGggUVZUS09wZW5HTFdpZGdldCB3aGljaCB3
YXMgYWRkZWQgaW4gOC4wLjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+SHRoLDwvZGl2PjxkaXY+
PGcgY2xhc3M9ImdyXyBncl8zMjAgZ3ItYWxlcnQgZ3Jfc3BlbGwgZ3JfaW5saW5lX2NhcmRzIGdy
X3J1bl9hbmltIENvbnRleHR1YWxTcGVsbGluZyBpbnMtZGVsIG11bHRpUmVwbGFjZSIgaWQ9IjMy
MCIgZGF0YS1nci1pZD0iMzIwIj5TYW5raGVzaDwvZz48L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 12, 2018 at 9:55 AM Shawn Waldon <<a href="mailto:shawn.waldon@kitware.com">shawn.waldon@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Ignacio,<br><br></div>IIRC, VTK 6.2 was before VTK had real support for Qt5 and there were still some major issues with VTK + Qt5 (as you have noticed).  You will either have to backport changes or update to a newer VTK.  I think VTK 8.1 may be the first release since QVTKOpenGLWidget (full Qt5 support) was added, although it may have been in 8.0.  You could try backporting QVTKOpenGLWidget, but I'm not sure how difficult that will be (it requires Qt 5.5 or 5.6 minimum I think).  Also, QVTKOpenGLWidget only works with the newer "OpenGL2" rendering backend which was still experimental in VTK 6.2.  So you may have trouble with that too.  Your easiest approach would probably be to use a newer VTK.</div><div><br></div>HTH,<br></div>Shawn<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 12, 2018 at 8:48 AM, Sankhesh Jhaveri <span dir="ltr"><<a href="mailto:sankhesh.jhaveri@kitware.com" target="_blank">sankhesh.jhaveri@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_-5305010064435332222m_1147904403430229720markdown-here-wrapper" style="font-family:"Lucida Sans",Cantarell,Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi Ignacio,</p>
<p style="margin:0px 0px 1.2em!important">In general, depth peeling is known to work with VTK and Qt5.<br>Are you using the <a href="https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html" target="_blank">QVTKOpenGLWidget</a>?<br>Could you post your modifications somewhere for us to see?</p>
<p style="margin:0px 0px 1.2em!important">Thanks,<br>Sankhesh</p>
<div title="MDH:SGkgSWduYWNpbyw8ZGl2Pjxicj48L2Rpdj48ZGl2PkluIGdlbmVyYWwsIGRlcHRoIHBlZWxpbmcg
aXMga25vd24gdG8gd29yayB3aXRoIFZUSyBhbmQgUXQ1LjwvZGl2PjxkaXY+QXJlIHlvdSB1c2lu
ZyB0aGUmbmJzcDtbUVZUS09wZW5HTFdpZGdldF0oPGEgaHJlZj0iaHR0cHM6Ly93d3cudnRrLm9y
Zy9kb2MvbmlnaHRseS9odG1sL2NsYXNzUVZUS09wZW5HTFdpZGdldC5odG1sIj5odHRwczovL3d3
dy52dGsub3JnL2RvYy9uaWdodGx5L2h0bWwvY2xhc3NRVlRLT3BlbkdMV2lkZ2V0Lmh0bWw8L2E+
KT88L2Rpdj48ZGl2PkNvdWxkIHlvdSBwb3N0IHlvdXIgbW9kaWZpY2F0aW9ucyBzb21ld2hlcmUg
Zm9yIHVzIHRvIHNlZT88L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2PlRoYW5rcyw8L2Rpdj48ZGl2
PjxnIGNsYXNzPSJncl8gZ3JfMjA2IGdyLWFsZXJ0IGdyX3NwZWxsIGdyX2lubGluZV9jYXJkcyBn
cl9ydW5fYW5pbSBDb250ZXh0dWFsU3BlbGxpbmcgaW5zLWRlbCBtdWx0aVJlcGxhY2UiIGlkPSIy
MDYiIGRhdGEtZ3ItaWQ9IjIwNiI+U2Fua2hlc2g8L2c+PC9kaXY+" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div><div class="m_-5305010064435332222HOEnZb"><div class="m_-5305010064435332222h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 12, 2018 at 7:45 AM Ignacio Fernández Galván via vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm trying to get depth peeling and Qt interface to work together with<br>
VTK 6.2.0 (Ubuntu 16.04) and python, and I'm not having much success.<br>
<br>
Depth peeling with "plain" VTK works fine<br>
(<a href="http://vtk.1045678.n5.nabble.com/Enable-depth-peeling-after-initialization-td5746070.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.com/Enable-depth-peeling-after-initialization-td5746070.html</a>),<br>
but then problems start<br>
<br>
I can't try PyQt4 because "import vtk" crashes (see<br>
<a href="https://gitlab.kitware.com/vtk/vtk/issues/16009" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/issues/16009</a>).<br>
<br>
So I modified<br>
<a href="https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt" rel="noreferrer" target="_blank">https://www.vtk.org/Wiki/VTK/Examples/Python/Widgets/EmbedPyQt</a> to work<br>
with PyQt5. I also modified QVTKRenderWindowInteractor to use PyQt5 and<br>
configure the RenderWindow with:<br>
<br>
self._RenderWindow.SetMultiSamples(0)<br>
self._RenderWindow.SetAlphaBitPlanes(1)<br>
<br>
but (a): the sphere looks weird, like some facets being inside out and<br>
not being rendered, and (b): depth peeling is not enabled with the<br>
translucent object that works without Qt.<br>
<br>
If I use an external (non-Qt) render window, it works fine, but then the<br>
event loop conflicts with Qt and I get a working VTK window and a frozen<br>
Qt interface.<br>
<br>
I would appreciate some help or a working example, or even the assertion<br>
that it will never work.<br>
<br>
Thanks,<br>
Ignacio<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br clear="all"><br></div></div><span class="m_-5305010064435332222HOEnZb"><font color="#888888">-- <br><div dir="ltr" class="m_-5305010064435332222m_1147904403430229720gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="m_-5305010064435332222m_1147904403430229720inbox-inbox-inbox-inbox-inbox-inbox-inbox-markdown-here-wrapper" style="font-family:"proza libre",sans-serif;color:rgb(0,56,107)"><h5 id="m_-5305010064435332222m_1147904403430229720inbox-inbox-inbox-inbox-inbox-inbox-inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="m_-5305010064435332222m_1147904403430229720inbox-inbox-inbox-inbox-inbox-inbox-inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:"open sans",sans-serif;font-weight:normal"><em>Sr. Research & Development Engineer</em> | <a href="http://www.kitware.com/" target="_blank">Kitware</a> | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417</a></h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDEx
LCA4MywgMTQ4KTsiPjxmb250IHNpemU9IjIiPiMjIyMjU2Fua2hlc2ggSmhhdmVyaTwvZm9udD48
L2I+PGRpdj48Zm9udCBjb2xvcj0iIzBiNTM5NCIgZmFjZT0idmVyZGFuYSwgc2Fucy1zZXJpZiIg
c2l6ZT0iMiI+PGI+PGJyPjwvYj48L2ZvbnQ+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6
IGFyaWFsLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDExLCA4MywgMTQ4KTsiPjxzcGFuIHN0eWxl
PSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsiPjxpPiMjIyMjIypTci4gUmVzZWFy
Y2ggJmFtcDsgRGV2ZWxvcG1lbnQgRW5naW5lZXIqPC9pPiZuYnNwO3wmbmJzcDs8L3NwYW4+PC9z
cGFuPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsgY29sb3I6
IHJnYigxMSwgODMsIDE0OCk7Ij48YSBocmVmPSJodHRwOi8vd3d3LmtpdHdhcmUuY29tLyIgdGFy
Z2V0PSJfYmxhbmsiIHN0eWxlPSJjb2xvcjogcmdiKDE3LCA4NSwgMjA0KTsiPktpdHdhcmU8L2E+
Jm5ic3A7fCZuYnNwOzwvc3Bhbj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IHZlcmRhbmEsIHNh
bnMtc2VyaWY7IGNvbG9yOiByZ2IoMTEsIDgzLCAxNDgpOyI+KDUxOCkgODgxLTQ0MTc8L3NwYW4+
PGJyPjwvZGl2PjxkaXY+PGRpdj48ZGl2PjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFu
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px">​</div></div></div></div>
</font></span><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-inbox-inbox-inbox-inbox-inbox-inbox-markdown-here-wrapper" style="font-family:"proza libre",sans-serif;color:rgb(0,56,107)"><h5 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:"open sans",sans-serif;font-weight:normal"><em>Sr. Research & Development Engineer</em> | <a href="http://www.kitware.com/">Kitware</a> | (518) 881-4417</h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDEx
LCA4MywgMTQ4KTsiPjxmb250IHNpemU9IjIiPiMjIyMjU2Fua2hlc2ggSmhhdmVyaTwvZm9udD48
L2I+PGRpdj48Zm9udCBjb2xvcj0iIzBiNTM5NCIgZmFjZT0idmVyZGFuYSwgc2Fucy1zZXJpZiIg
c2l6ZT0iMiI+PGI+PGJyPjwvYj48L2ZvbnQ+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6
IGFyaWFsLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDExLCA4MywgMTQ4KTsiPjxzcGFuIHN0eWxl
PSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsiPjxpPiMjIyMjIypTci4gUmVzZWFy
Y2ggJmFtcDsgRGV2ZWxvcG1lbnQgRW5naW5lZXIqPC9pPiZuYnNwO3wmbmJzcDs8L3NwYW4+PC9z
cGFuPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsgY29sb3I6
IHJnYigxMSwgODMsIDE0OCk7Ij48YSBocmVmPSJodHRwOi8vd3d3LmtpdHdhcmUuY29tLyIgdGFy
Z2V0PSJfYmxhbmsiIHN0eWxlPSJjb2xvcjogcmdiKDE3LCA4NSwgMjA0KTsiPktpdHdhcmU8L2E+
Jm5ic3A7fCZuYnNwOzwvc3Bhbj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IHZlcmRhbmEsIHNh
bnMtc2VyaWY7IGNvbG9yOiByZ2IoMTEsIDgzLCAxNDgpOyI+KDUxOCkgODgxLTQ0MTc8L3NwYW4+
PGJyPjwvZGl2PjxkaXY+PGRpdj48ZGl2PjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFu
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px">​</div></div></div></div>