Yet another QVTKOpenGLWidget renaming ?

Hi Community,

With VTK-9 coming, I wonder if we should rename QVTKOpenGLWidget again, as the new version was not so much used after all as it has some specific failings, while it’s only advantage is to support stereo rendering.

I suggest then the following renaming :

QVTKOpenGLNativeWidget -> QVTKOpenGLWidget
QVTKOpenGLWidget -> QVTKOpenGLStereoWidget

As some have remarked it, this suggest the the newly named QVTKOpenGLStereoWidget will never be adopted as a generic widget. I personally am fine with that. So difficulties present with it are inherent to it’s design and can’t be solved on our side, but only on Qt/GraphicDriverStack which we have no control of. As this design is not preferred by the Qt community, I’m not hopeful for these issues to be fixed.

Do you have any inputs on this ?


Hi Mathieu,
For the sake of clarity
+1 for the change :slight_smile:

1 Like

As a person who is usually averse to making naming changes, I think the current names are confusing at best and the suggested names are much clearer. So +1 from me.

I think the rename makes sense too, so +1 from me.

The only thing I want to ask: Is it conceivable that there may be some other functionality/context besides stereo rendering for which you would choose the QVTKOpenGLStereoWidget? If so, is there some other name that would be more fitting, something alluding to the way the widget is implemented maybe?

If it will only ever be a choice for stereo rendering, and only stereo rendering, then the name is good.

You may want to give us your inputs on this potential QVTKOpenGLWidget renaming :
@embeddedmz @lassoan @Andrew @cryos @ken-martin @utkarshayachit @kerim @Paulo_Carvalho

+1. If we can think of a new name other than QVTKOpenGLWidget to avoid confusion with old name that’d be great, but not required.

Not to stir up any long discussions, but how about vtkQWidget? I always found the QVTK prefix a little off from normal VTK class naming.

May be out of the question considering the other QVTK-prefixed helper/implementation classes, but thought I’d air the idea at least.

1 Like

The reasoning behind the QVTK prefix was that it indicated to the user/developer that it is a QObject subclass. Also, the API style would follow Qt’s rather than VTK’s, thus methods named with lowerCase etc etc.


QVTKOpenGLWidget sounds good, but usually the “OpenGL” word is not included in class names that users should normally use (only in low-level implementation classes). So, QVTKWidget, QVTKRenderWidget, QVTKRenderWindowWidget names would be somewhat more appropriate.

Yep, I understand the logic. vtk* ==> typically inherits vtkObject/vtkObjectBase, QVTK ==> inherits QObject. I believe it’s discouraged to use the Q* prefix for classes outside of Qt itself though (even if the VTK probably makes this OK).

In my suggestion vtkQWidget, I thought that even if it’s not inheriting vtkObject, it is a VTK class, so has the vtk* prefix, and it’s a QWidget, hence the QWidget in the name (the Q included to not be confused with VTK’s own widgets), and the OpenGL has been left out since it’s an implementation detail.

But the more I think of it, it’s probably water under the bridge, with the QVTK* prefix used for a bunch of classes in VTK at this point. So let’s keep it that way!