title: How to move function to QThread?
body: <p>I have a function called <code>refreshLogDisplay()</code> in my MainWindow class which does a lot of UI work.  The code in it is like this:</p>
  
  <pre><code>ui-&gt;tablewidget-&gt;setRowCount(100);
  // ...     
  </code></pre>
  
  <p>So the function deals with a lot of protected properties of MainWindow class.  But I want to move the function to another QThread.  In that QThread, I want a while loop to call the 'refreshLogDisplay' 500 times per second.  The 500 times per second <strong>is very important</strong>, and I do not want any timer to do this because timers are too slow.</p>
  
  <p>I only know how to implement a subclass inheriting QThread, which cannot access <code>ui-&gt;tablewidget</code> things.  There is a <a href="http://qt-project.org/doc/qt-4.8/qobject.html#moveToThread" rel="nofollow">QObject::moveToThread()</a> function, but it doesn't seem to help.</p>
  
  <p>Any good suggestions?</p>