title: invalid use of non-static member function( in qt)
body: <p>I've prototyped my function in my mainwindow.h class file(header?):</p>
  
  <pre><code>    class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
      public:
      void receiveP();
  </code></pre>
  
  <p>Then in my main.cpp class file I tell the function what to do:</p>
  
  <pre><code>void MainWindow::receiveP()
  {
       dostuff
  }
  </code></pre>
  
  <p>Then in the main function of my main.cpp class file I try to use it in a thread:</p>
  
  <pre><code> std::thread t1(MainWindow::receiveP);
   t1.detach();
  </code></pre>
  
  <p>Which gives me the error "invalid use of non-static member function 'void MainWindow::receiveP()'.</p>