title: No matching function for QObject::connect
body: <p>I'm writing a program that send an UDP frame every 10 mS. Here's how my program is supposed to work :</p>
  
  <p>I've got a <code>client class</code> :</p>
  
  <pre><code>//Constructor
  clientSupervision::clientSupervision()
  {
  }
  
  void clientSupervision::sendDataUDP(){
      //Create a frame and send it
  ...
  }
  
  void clientSupervision::sendDataUDPTimer(int timer){
      QTimer *tempsEnvoieTrameSupervision = new QTimer();//Create a timer
      tempsEnvoieTrameSupervision-&gt;setInterval(timer);//Set the interval
  
      //Mise en place des connections
      QObject::connect (tempsEnvoieTrameSupervision,SIGNAL (timeout()),this, SLOT (envoiTrameSupervision())); //Connect the timer to the function
      tempsEnvoieTrameSupervision-&gt;start();// Start the timer
  }
  
  //Call sendDataUDP
  void clientSupervision::envoiTrameSupervision(){
      std::cout &lt;&lt; "Envoi de la trame de supervision";
      sendDataUDP();
  }
  </code></pre>
  
  <p>My header file of <code>clienSupervision.h</code> :</p>
  
  <pre><code>#ifndef CLIENTSUPERVISION_H
  #define CLIENTSUPERVISION_H
  #include &lt;winsock2.h&gt; // pour les fonctions socket
  #include &lt;cstdio&gt; // Pour les Sprintf
  #include "StructureSupervision.h"
  #include "utilitaireudp.h"
  #include &lt;QTimer&gt;
  #include &lt;QObject&gt;
  #include &lt;iostream&gt;
  class clientSupervision
  {
      Q_OBJECT
  public:
      clientSupervision();
      void sendDataUDP();
      void sendDataUDPTimer(int timer);
  
  public slots:
      void envoiTrameSupervision();
  };
  
  #endif // CLIENTSUPERVISION_H
  </code></pre>
  
  <p>Then I use this in my <code>main</code> :</p>
  
  <pre><code>int main(int argc, char *argv[])
  {
      clientSupervision c;
      c.sendDataUDPTimer(10);
      QCoreApplication a(argc, argv);
  
      return a.exec();
  }
  </code></pre>
  
  <p>I've got the error : </p>
  
  <blockquote>
    <p>no matching function for call to 'QObject::connect(QTimer*&amp;, const char*, clientSupervision* const, const char*)</p>
  </blockquote>
  
  <p>I don't understand why the connect function can't find a matching function.</p>
  
  <p>What should I change?</p>