<div dir="ltr">Here's a commit that hopefully removes the need for your `showEvent` override.<div><a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/2885">https://gitlab.kitware.com/vtk/vtk/merge_requests/2885</a><br></div><div><br></div><div>Can you give it a try please?</div><div><br></div><div>Thanks</div><div>Utkarsh</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 29, 2017 at 11:39 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2017-05-29 17:34 GMT+02:00 Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a>>:<br>
> I suspect there's a bug in Qt when it comes to reparenting QOpenGLWidget. I<br>
> can reproduce an issue with ParaView on linux when I simply undock the Color<br>
> Map Editor and then redock it. The Color/Opacity widgets stay black. Looking<br>
> at the code, I see this [1] happens when the dock widget is docked back into<br>
> the main window. As expected the OpenGL context is destroyed, and<br>
> QVTKOpenGLWIdget correctly does the cleanup. But the QVTKOpenGLWidget never<br>
> gets a follow on paintGL call (unless I mouse over to resize the dock panel<br>
> manually). Thus QVTKOpenGLWidget new repaints into the newly minted<br>
> OpenGLContext/FBO resulting in a black widget.<br>
<br>
</span>Ah, in my case I don't think there's reparenting involved though.<br>
<br>
My problem was that the interactor's size was never updated to cover<br>
the render window when it was initially shown (I think), see my other<br>
mail just now.<br>
<br>
Gotto head home, but will debug more tomorrow.<br>
<span class="HOEnZb"><font color="#888888"><br>
Elvis<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Utkarsh<br>
><br>
> [1]<br>
> <a href="https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qopenglwidget.cpp.html#1418" rel="noreferrer" target="_blank">https://code.woboq.org/qt5/<wbr>qtbase/src/widgets/kernel/<wbr>qopenglwidget.cpp.html#1418</a><br>
><br>
><br>
> On Mon, May 29, 2017 at 11:06 AM, Marcus D. Hanwell<br>
> <<a href="mailto:marcus.hanwell@kitware.com">marcus.hanwell@kitware.com</a>> wrote:<br>
>><br>
>> On Mon, May 29, 2017 at 9:32 AM, Elvis Stansvik<br>
>> <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>> ><br>
>> > 2017-05-29 15:26 GMT+02:00 Sebastien Jourdain<br>
>> > <<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.<wbr>com</a>>:<br>
>> > > You need to set the size on the interactor.<br>
>> ><br>
>> > Ah, how do I do that? (sorry for being a bit dumb)<br>
>> ><br>
>> > I've been scouring over the PV code, and I can't see that it does<br>
>> > anything special with its interactor. It seems to just hook it up:<br>
>> ><br>
>> I assume you are using QVTKOpenGLWidget, we use this directly in<br>
>> Tomviz for a few charts that control color/opacity too. This should be<br>
>> handled in the QVTKOpenGLWidget, but it is possible an initialization<br>
>> bug has crept in. I have noticed that ParaView often doesn't see this<br>
>> issues as much due to resizing Qt widgets several times on startup, I<br>
>> will see if I can get some time to test the latest Tomviz (we had this<br>
>> working, but I haven't been tracking VTK master as closely these last<br>
>> few weeks).<br>
>> ______________________________<wbr>_________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
>><br>
><br>
</div></div></blockquote></div><br></div>