QMetaObject::Connection dis;
dis = connect(this,&TcpSocket::readyRead,this,&TcpSocket::readData);
disconnect(dis);
QMetaObject::Connection dis;
dis = connect(this,&TcpSocket::readyRead,this,&TcpSocket::readData);
disconnect(dis);
转载于:https://www.cnblogs.com/god-of-death/p/7840238.html