title: start doesn't invoke run
body: <p>I'm trying to implement some small app which is a gui app and has some heavy work to do as a one of it's main tasks. Obviously I'm putting this "work" into a separate thread and starting this thread by invoking start fnc on this obj. Unfortunatelly nothing happens. On the other hands when instead of start I invoke implemented fnc run computations are performed as they should although of course in same thread as gui. What to do?<br>
  So I have class inheriting QThread:  </p>
  
  <pre><code>class Working_Thread : public QThread
  {
      Q_OBJECT
  public:
      typedef boost::filesystem3::path path_t;
  
  private:
      bool&amp; cancel_flag_;
      const std::set&lt;path_t&gt;&amp; paths_;
      int search_depth_;
      typedef void (Dir_File_Select_Dialog::*fnc_ptr)(const std::set&lt;path_t&gt;&amp;,int);
      fnc_ptr fnc_;
      Dir_File_Select_Dialog* parent_;
  protected:
      void run()
      {
  
          (parent_-&gt;*fnc_)(paths_,search_depth_);
      }
  public:
  
      Working_Thread(bool&amp; cancel_flag,const std::set&lt;path_t&gt;&amp;,int&amp;,fnc_ptr fnc,Dir_File_Select_Dialog* parent);
  
  
  };
  </code></pre>
  
  <p>And here is fragment from gui thread when I try to start new thread:</p>
  
  <pre><code> Working_Thread* working_thread = new Working_Thread(cancel_flag,paths,search_depth,&amp;Dir_File_Select_Dialog::extract_files_,this);
          working_thread-&gt;start();//this desn't invoke run fnc
  </code></pre>
  
  <p>but when I do:   </p>
  
  <pre><code>working_thread-&gt;run();//this will perform computations although in gui thread
  </code></pre>
  
  <p>UPDATE:<br>
  Little change I did which now performs computations when using start fnc but it still blocks GUI.  </p>
  
  <pre><code>Working_Thread* working_thread = new Working_Thread(cancel_flag,paths,search_depth,&amp;Dir_File_Select_Dialog::extract_files_,this);
      working_thread-&gt;start();//hangs
      working_thread-&gt;wait();//when I call wait here computation is performed but GUI is blocked.
  </code></pre>