You can't copy QTcpSocket s, so it may cause other cryptic errors if you try to pass them by copy rather than ...
stackoverflow.com