Hello,
Few issues with Your code:
QThread constructor moveToThread( this); is error. QThread class is just control object and is not actually a separate thread. You should move class base on QObject (with would be wrapper for QTcpSocket communication) or QTcpSocket to separate thread.
2.. Don't know if this is Ui application but You are using blocking approach (may be ok for Your case)
Error handing :
connect (QTcpSocket, SIGNAL( error(QAbstractSocket::SocketError socketError)), this, SLOT( error(QAbstractSocket::SocketError socketError)));
to handle connection error.
Close socket via QTcpSocket::close() or abort() + close()