<div dir="ltr"><div>My strong preference is only call Render() within Qt's paintEvent(),<br></div><div>and to disable Render() everywhere else.  Then, when I want VTK</div><div>to render, I call update() on my QWidget to let Qt know that it has</div><div>to re-paint.</div><div><br></div><div>This keeps things nicely synchronized between VTK and Qt, which</div><div>is especially important for things like resizing the window.</div><div><br></div><div>Another thing that I do differently from QVTKWidget is that I install</div><div>a dummy QPaintEngine so that Qt never executes any drawing</div><div>commands within the widget, but that's a separate issue from the</div><div>event loop bug.</div><div><br></div><div> - David</div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 10, 2017 at 1:13 PM, 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-04-10 21:10 GMT+02:00 Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>><wbr>:<br>
> 2017-04-10 20:07 GMT+02:00 Pat Marion <<a href="mailto:james.patrick.marion@gmail.com">james.patrick.marion@gmail.<wbr>com</a>>:<br>
>> Hi Elvis,<br>
>><br>
>> In prior emails you mentioned that you use a QVTKWidget subclass (or<br>
>> QVTKWidget2?) that contains a workaround for this event issue.  Is this<br>
>> class something that you can share?  Do you recommend using this workaround,<br>
>> or is the patched qt5.5 preferable?<br>
><br>
> Sure, I'm attaching VTKWidget.h/cpp, which contains the QVTKWidget<br>
> subclass I'm currently using.<br>
><br>
> If I remember correctly, it was David Gobbi who led me to this<br>
> workaround, so he should have the credit.<br>
<br>
</span>My bad, it was Clint and David together who helped me out. This was<br>
the original thread:<br>
<br>
    <a href="http://public.kitware.com/pipermail/vtkusers/2016-July/095802.html" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>pipermail/vtkusers/2016-July/<wbr>095802.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
Elvis<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> It's of course preferable to use a fixed Qt (5.6 or higher, or patched<br>
> 5.5.1), but I'll use this workaround until the patched package is in<br>
> the xenial-updates repo (the upload to xenial-proposed seems to take<br>
> some time, I guess the approvers are busy).<br>
><br>
> Elvis<br>
><br>
>><br>
>> Pat<br>
>><br>
>> On Mon, Mar 20, 2017 at 4:55 PM, Elvis Stansvik<br>
>> <<a href="mailto:elvis.stansvik@orexplore.com">elvis.stansvik@orexplore.com</a>> wrote:<br>
>>><br>
>>> > On Mon, Jul 13, 2015 at 16:51:34 -0400, Ben Boeckel wrote:<br>
>>> >> On Mon, Jul 13, 2015 at 15:00:56 -0400, Ben Boeckel wrote:<br>
>>> >>>     <a href="https://codereview.qt-project.org/#/c/115531/" rel="noreferrer" target="_blank">https://codereview.qt-project.<wbr>org/#/c/115531/</a><br>
>>> >><br>
>>> >> Applying this patch (with one conflicting hunk) to 5.5.0 fixes the<br>
>>> >> problem for me. I'll poke the review to see if some movement can't be<br>
>>> >> made.<br>
>>> ><br>
>>> > It looks like the patch has been merged for 5.6.0 (due at the end of<br>
>>> > October).<br>
>>><br>
>>> Just in case anyone is in the same boat like me, hitting this bug on<br>
>>> Ubuntu 16.04 LTS (which has Qt 5.5.1), just FYI I'm trying to get an<br>
>>> SRU (Stable Release Update) going with this fix:<br></div></div></blockquote></div></div></div>