First of all, you're missing the Q_OBJECT macro. Secondly, create the socket in QThread::run(), not in constructor. And finally, make sure you enforce the connection as direct because otherwise the slot will get called in main thread's context (that's where the thread object itself "lives" in):
connect( receiveSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()), Qt::DirectConnection);
connect( receiveSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams()), Qt::DirectConnection);
To copy to clipboard, switch view to plain text mode
Bookmarks