title: How can I set text of label when a function is running?
body: <p>I want to set the text of a label on main window when a function in code is running. But the label does not change until the function ends.</p>
  
  <pre><code>for (int i = 0; i &lt; files.size(); ++i) {
  
      ui-&gt;label-&gt;setText(files[i]);
      myfoo();
  
  }
  </code></pre>