Hello,
I wanted to do an action when an incoming connection to the server is established from a client.
i wrote this line :
connect(socket,SIGNAL(connected()), this, SLOT(connected()));
connect(socket,SIGNAL(connected()), this, SLOT(connected()));
To copy to clipboard, switch view to plain text mode
while "socket" is is a pointer to QTcpSocket :
socket = new QTcpSocket;
To copy to clipboard, switch view to plain text mode
But the statement doesn't invoke te SLOT "connected()" .
but when I write the following code:
connect(socket,SIGNAL(disconnected()), this, SLOT(connected()));
connect(socket,SIGNAL(disconnected()), this, SLOT(connected()));
To copy to clipboard, switch view to plain text mode
The SLOT "connected()" will be called when the Client is exited.
The issue:
I need to invoke the SLOT when an incoming connection established from a client.
Thanks.
Bookmarks