<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2016-02-04 19:01 GMT+01:00 David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Elvis,</div><div><br></div><div>You should be able to copy the QVTKRenderWindowInteractor.py from</div><div>the VTK master branch into your project (even rename it if you like) and</div><div>then use it with any version of VTK.</div><div><br></div><div>Just replace the two try/except blocks at the top of the file with this:</div><div><br></div><div> PyQtImpl = "PyQt5" # or "PyQt4" or "PySide"<br></div> QVTKRWIBase = "QWidget" # or "QGLWidget"<div><br></div><div>You can think of this script as an example that that you can grab and</div><div>and modify to suit your own purposes.</div></div></blockquote><div><br></div><div>That worked great, except for a small issue with a missing QWheelEvent::delta() in PyQt5 (see my merge request 1185).<br><br></div><div>However, with QWidget as base class, I'm getting some strange rendering. With QGLWidget it looks fine.<br><br></div><div>See the attached screenshot. It shows the cone example from QVTKRenderWindowInteractor.py with QWidget (left) and QGLWidget (right). With QWidget, the cone faces seem partly transparent from some angles.<br><br></div><div>Any idea what might be going on? This is VTK 6.2.0, Kubuntu 15.10, on Intel graphics (Thinkpad T440s).<br><br></div><div>Elvis<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span class=""><font color="#888888"><div><br></div></font></span><div><span class=""><font color="#888888"> - David</font></span><div><div class="h5"><br><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 8:16 AM, Elvis Stansvik <span dir="ltr"><<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div>Hi all,<br><br></div>I have the same question as Alex on this list had in April last year:<br><br> <a href="http://markmail.org/message/i3e4dxwxqravlaf3" target="_blank">http://markmail.org/message/i3e4dxwxqravlaf3</a><br><br></div>Is it possible to use PyQt5 with VTK 6.2?<br><br></div>I'm on a *buntu system, and the python-vtk6 package installs the following Qt related files:<br><br>estan@newton:~$ dpkg -L python-vtk6 | grep -i qt<br>/usr/lib/python2.7/dist-packages/vtk/qt4<br>/usr/lib/python2.7/dist-packages/vtk/qt4/QVTKRenderWindowInteractor.py<br>/usr/lib/python2.7/dist-packages/vtk/qt4/__init__.py<br>/usr/lib/python2.7/dist-packages/vtk/<a href="http://vtkRenderingQtPython.x86_64-linux-gnu.so" target="_blank">vtkRenderingQtPython.x86_64-linux-gnu.so</a><br>/usr/lib/python2.7/dist-packages/vtk/vtkRenderingQt.py<br><br></div>ldd on the .so shows it is linking against Qt 5, but is that enough. Or must I have a QVTKRenderWindowInteractor that works with PyQt5 as well? It seems a port of that class to PyQt5 was done only 5 months ago:<br><br> <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/101" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/101</a><br><br></div>So would not be in 6.2 :/<br><br></div>Are there really no software out there which uses PyQt5 + VTK and only make use of packaged versions?<br><br></div>Cheers,<br></div>Elvis<br></div>
<br></blockquote></div><br></div></div></div></div></div></div></div>
</blockquote></div><br></div></div>