There is no need to create a socket descriptor, QTcpServer::nextPendingConnection() creates a fully constructed QTcpSocket object.

Cheers,
_