[Solved] QTcpServer with console application (Event Loop)
I have a very simple application to use QTcpServer.
Where the server is just a class that inherits the QTcpServer and reimplement the incomingconnection method to handle the clients in separate thread.
After the first client connects everything is working perfectly, but then the server seems to be stop listening on the local port.
Writing the dtor I’ve noticed after the first client served the server is removed (I mean the dtor is called)
So I declared the (server) obj to be global one, before main, but I had the same problem.
I know the event loop will wait for incoming events including the incomingconnection, but what I can’t get why the server is destructed after the first client?