[vtkusers] Find reason for exclusion of vtkGUISupportQtOpenGL in build output?

Elvis Stansvik elvis.stansvik at orexplore.com
Wed Jun 29 12:43:23 EDT 2016

Den 29 juni 2016 6:07 em skrev "Shawn Waldon" <shawn.waldon at kitware.com>:
>> I see, I may have misunderstood the role of QVTKWidget2 is vs
QVTKWidget. I thought QVTKWidget2 was essentially a newer replacement for
QVTKWidget, and to be preferred in new code.
>> I've also misunderstood a little how the two widgets work. I knew
QVTKWidget2 makes use of the deprecated QGLWidget (and was in fact trying
to make a similar Python class just recently, which uses QOpenGLWidget, but
ran into some problems). But I also wrongly thought that QVTKWidget used
QGLWidget, looking at the code I see now that it doesn't.
>> So in short: I have no great need for QVTKWidget2, functionality-wise.
So if using it precludes using the OpenGL2 backend, I'll use QVTKWidget
>> One thing I did like was that the code in QVTKWidget2 looked a little
simpler/cleaner than the one QVTKWidget. It's always nice to be able to
quickly check how something work.
>> An officially supported widget, based on QOpenGLWidget and supporting
the OpenGL2 backend, would be the absolutely best of course. In fact,
there's an answer on StackOverflow where a user posted his QVTKWidget2
hacked to work with QOpenGLWidget [1], perhaps it could be used as a
starting point?
> So just to throw this out there, here is the situation as I understand
it.  Ben (cc'd) can correct what I get wrong since he was one of the last
to touch QVTKWidget2.
> QVTKWidget works fine with OpenGL2 if you are building against Qt4.  But
when you build for Qt5 there are issues with creating the OpenGL context
and letting Qt know the context is there and so some features of the
OpenGL2 backend don't work right.
> Ben updated (or has a branch to udpate?) QVTKWidget2 so that it fixes
these problems and works with Qt5, but if you are on Linux you need Qt5.6
for a bugfix in Qt (otherwise there are interactivity problems when
interacting with the mouse).

Aha, so it seems I'm stuck between a rock and a hard place if I'm on Qt 5
and want to use the OpenGL2 backend with a released version of VTK (so
7.0.0 or hopefully soon 7.0.1)?

Additionally, this app is to be deployed with the Qt shipped on Ubuntu
16.04, which is 5.5.1, so even if I would switch to a special VTK branch,
I'd suffer interactivity problems (?).

So say I give up on using the OpenGL2 backend, and use the combo QVTKWidget
+ Qt 5.5.1 + OpenGL backend. Can I expect any problems there?

The target hardware is a laptop with dual GPUs of our choosing, where the
nVidia GPU is occupied for calculations, so VTK will in all likelihood run
on a Intel GPU, with the driver version in Xenial. I'll also have to be
able to develop on my work laptop (Haswell), which has Intel graphics. Will
the old fixed pipeline OpenGL backend be a problem on these systems?

Volume rendering is the only GPU heavy VTK feature I'll use I think.

Thankful for any advice on what is currently the most reliable combo.


> Yes, an officially supported QOpenGLWidget-based QVTKWidget3 would be the
best way forward.  But I don't know what the status of that discussion is...
> HTH,
> Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160629/b126d436/attachment.html>

More information about the vtkusers mailing list