<p dir="ltr"><br>
Den 29 juni 2016 6:07 em skrev "Shawn Waldon" <<a href="mailto:shawn.waldon@kitware.com">shawn.waldon@kitware.com</a>>:<br>
>><br>
>><br>
>> 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.<br>
>><br>
>> 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.<br>
>><br>
>> 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 instead.<br>
>><br>
>> 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.<br>
>><br>
>> 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?<br>
><br>
><br>
> 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.<br>
><br>
> 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.</p>
<p dir="ltr">Do you know which features and if this is being worked out?</p>
<p dir="ltr">Elvis</p>
<p dir="ltr">><br>
> 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).<br>
><br>
> 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...<br>
><br>
> HTH,<br>
><br>
> Shawn<br>
</p>