QTcpServer will not tell you the address / port directly on the incoming connection, but you can get it by getting the connected QTcpSocket from QTcpServer :: nextPendingConnection (), and then using the peerAddress () and peerPort () methods of QTcpSocket.
source share