[vtkusers] The real difference between QVTKWidget and QVTKWidget2

Thales Luis Rodrigues Sabino tluisrs at gmail.com
Thu Mar 10 11:41:05 EST 2016


I'm building an application that uses VTK for visualization.
My initial intent was to process large volumes of data.
My application is being built with Qt + VTK.

When I started coding the visualization toolkit with VTK I found the
*QVTKWidget*. So far so good, I found another one, called *QVTKWidget2*. In
the *QVTKWidget2*.h header there is the following statement:

*// .NAME QVTKWidget2 - Display a vtkRenderWindow in a Qt's QGLWidget.*
*// .SECTION Description*
*// QVTKWidget2 provides a way to display VTK data in a Qt OpenGL widget.*

Well, since this class uses the *QGLWidget* (which BTW is now deprecated,
replaced by *QOpenGLWidget*), I decided to use this one. I also based my
decision in some discussion I read about *QVTKWidget2* being a future
replacement for the *QVTKWidget* class.

Everything was fine until I decided to run my application on MacOS and the
QVTKWidget2 object was crashing in initialization.

I then replaced my widget to one of *QVTKWidget* and everything is now
working fine (at least in the initial tests).

So, with this context, my question is, do I get any advantage by using
*QVTKWidget2*?

My first thought was *'yes'*, since the *QVTKWidget* is a subclass of
*QWidget*.

Hope someone could clarify this for me.

-- 
Thales Luis Rodrigues Sabino

PhD Student at PGMC-UFJF <http://www.ufjf.br/pgmc/>
Lattes <http://lattes.cnpq.br/0601030410417146> | LinkedIn
<https://br.linkedin.com/in/tluisrs> | ResearchGate
<https://www.researchgate.net/profile/Thales_Luis_Sabino>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160310/7dfd89f6/attachment.html>


More information about the vtkusers mailing list