Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
check declaration: if you wrote QTcpSocket socket; you declare a object not a pointer. In this case you can t construct it with new.
QTcpSocket socket;
new
You should declare QTcpSocket* socket;
QTcpSocket* socket;