<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div>How often your worker thread calls back to the main thread is entirely dependent on what your thread is doing. I assume that would be each time it finishes another block of geometry for rendering. Anyway the key point is that the method to update the GUI must be synchronised with the main thread. </div><div><br></div><div>Without some example code of what you're trying to do, it is impossible to make any further recommendations.<br></div><div><br><div><br></div><div><br></div><div class="ydpbf15f53signature"><div style="font-size:16px;"><div>Todd Martin, Ph.D.<br></div><div>Freelance Engineer/Software Architect.</div><br></div></div></div>
            <div><br></div><div><br></div>
            
            <div id="yahoo_quoted_4020263856" class="yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Monday, April 9, 2018, 6:29:44 PM GMT+12, lor fal <lorfalwit@gmail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv3145754950"><div><div dir="ltr">

<span style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">Hi Todd,</span><div style="color:rgb(34,34,34);font-family:arial, sans-serif;font-size:small;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-color:initial;">Thanks for your advice. The problem is that I want to render the image in real-time. The solution suggested in the link you posted is no other than a repeating timer. Is there some way in Vtk to control the update rate?</div>

<br clear="none"></div><div class="yiv3145754950gmail_extra"><br clear="none"><div class="yiv3145754950yqt2797778360" id="yiv3145754950yqt01575"><div class="yiv3145754950gmail_quote">On Mon, Apr 2, 2018 at 6:31 PM, Todd <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:nztoddler@yahoo.com" target="_blank" href="mailto:nztoddler@yahoo.com">nztoddler@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv3145754950gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div>Hi Hugh</div><div><br clear="none"></div><div>GUI elements are normally only updated on the main thread, so I suspect you need to synchronize your callback from the worker thread. I'm not familiar with Qt, but it seems to be documented. </div><div><a rel="nofollow" shape="rect" target="_blank" href="http://www.informit.com/articles/article.aspx?p=1405551&seqNum=3">http://www.informit.com/ articles/article.aspx?p= 1405551&seqNum=3</a></div><span class="yiv3145754950HOEnZb"><font color="#888888"></font></span><div><br clear="none"></div><div><span class="yiv3145754950HOEnZb"><font color="#888888">Todd</font></span><div><div class="yiv3145754950h5"><br clear="none"><div class="yiv3145754950gmail_extra"><br clear="none"><div class="yiv3145754950gmail_quote">On 2 Apr 2018 10:00 p.m., lor fal <<a rel="nofollow" shape="rect" ymailto="mailto:lorfalwit@gmail.com" target="_blank" href="mailto:lorfalwit@gmail.com">lorfalwit@gmail.com</a>> wrote:<br clear="none"><blockquote class="yiv3145754950m_-2180165055365120599quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr">Hi all:<div><br clear="none"></div><div>I am using QVTKOpenGLWidget to bridge between Qt and Vtk. However, when I trying to call vtkRenderWindowInteractor:: Render in worker thread, it always report error like "makeCurrent() error", which seems something wrong while changing OpenGL context. I have googled my questions and found some suggestions but none of them could work.</div><div><br clear="none"></div><div>Does anybody know exactly how to render images in worker thread?</div><div><br clear="none"></div><div>Thanks in advance.<br clear="all"><div><br clear="none"></div>-- <br clear="none"><div><div dir="ltr"><div>Best regards,<br clear="none">Hugh Lo</div></div></div>
</div></div>
</blockquote></div><br clear="none"></div></div></div></div></div></blockquote></div></div><br clear="none"><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div class="yiv3145754950gmail_signature"><div dir="ltr"><div>Best regards,<br clear="none">Hugh Lo</div></div></div>
</div></div></div></div>
                </div>
            </div></div></body></html>