title: Is this the correct way to use a QThread?
body: <p>I am looking at some github projects, where one of them did the UDPlink in the following way,
  first it subclass QThread to create a class <code>UDPLink:public QThread</code>
  and its constructor and deconstructor is like:</p>
  
  <pre><code>UDPLink::UDPLink(UDPConfiguration* config)
      : _socket(NULL)
      , _connectState(false)
  {
      Q_ASSERT(config != NULL);
      _config = config;
      _config-&gt;setLink(this);
  
      // We're doing it wrong - because the Qt folks got the API wrong:
      // http://blog.qt.digia.com/blog/2010/06/17/youre-doing-it-wrong/
      moveToThread(this);
  
      // Set unique ID and add link to the list of links
      _id = getNextLinkId();
      qDebug() &lt;&lt; "UDP Created " &lt;&lt; _config-&gt;name();
  }
  
  UDPLink::~UDPLink()
  {
      // Disconnect link from configuration
      _config-&gt;setLink(NULL);
      _disconnect();
      // Tell the thread to exit
      quit();
      // Wait for it to exit
      wait();
      this-&gt;deleteLater();
  }
  </code></pre>
  
  <p>Though the code did compile and work, but I wonder whether this way of using a QThread would be correct?</p>