<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>By running the step in a different thread, what do you mean exactly ? <br>


</div></div></blockquote><div><br></div><div>Sorry, I was not clear. I run some calculations (ITK filters) in the workflow steps, and I start them in a new thread. The workflow step listens to the "finished" and "terminated" signal of the thread and it signals "onExitCompleted" after the thread is finished.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div>As a side note: "Although <a href="http://doc.qt.nokia.com/stable/qobject.html" target="_blank">QObject</a> is reentrant, the GUI classes, notably <a href="http://doc.qt.nokia.com/stable/qwidget.html" target="_blank">QWidget</a> and all its subclasses, are not reentrant. They can only be used from the main thread."<br>




See <a href="http://doc.qt.nokia.com/stable/threads-qobject.html" target="_blank">http://doc.qt.nokia.com/stable/threads-qobject.html</a></div></div></blockquote><div><br></div><div>Yes, I had some troubles because of this, but I solved them. I refactored every GUI access from the function that runs the calculation. E.g. the thread that runs the calculation notifies the GUI thread through signals about the progress of the internal ITK filters. In this way the thread does not need to access the progress bar.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">

<div>Would it be possible for you to share some code ? May a topic on your CTK fork ?</div></blockquote></div></div></blockquote><div><br></div><div>Yes, I will upload a sample app tomorrow.</div><div><br></div><div>Thanks,</div>

<div>Miklos</div><div><br></div></div>