O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

What just happened?

After getting the socket that emitted the call through sender(), we post the information that a socket is being removed. Then, we remove the socket from m_clients, remove the associated buffer from m_receivedData and call deleteLater() on it. Do not use delete. Lastly, if no client is left, the disconnect button is disabled.

The server is ready. Now let's take a look at the client.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required