Hello,

I wanted to do an action when an incoming connection to the server is established from a client.

i wrote this line :
Qt Code:
  1. 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 :
Qt Code:
  1. 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:
Qt Code:
  1. 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.