Hello,

file1.h
Qt Code:
  1. class MyServer : public QTcpServer
  2. {
  3. Q_OBJECT
  4.  
  5. .... // some code
  6.  
  7. signals:
  8. void _connection(int);
  9.  
  10. .... // rest of the code
To copy to clipboard, switch view to plain text mode 


file1.cpp
Qt Code:
  1. void MyServer::incomingConnection(int handle)
  2. {
  3. MyClient *client = new MyClient(this);
  4. client->setsocket(handle);
  5. emit _connection(handle); // i emit it here
  6. }
To copy to clipboard, switch view to plain text mode 

file2.h
Qt Code:
  1. #include "file1.h"
  2. class Blabla: public QObject
  3. {
  4. Q_OBJECT
  5.  
  6. ... // code here
  7.  
  8. private:
  9. MyServer *server;
  10.  
  11. ... // rest of code
To copy to clipboard, switch view to plain text mode 

file2.cpp
Qt Code:
  1. server = new MyServer;
  2.  
  3. connect(server,SIGNAL(_connection()), this, SLOT(connected())); // the slot is declared in the code
To copy to clipboard, switch view to plain text mode 

The issue:
----------
The signal is not emitted within the incoming connction.

The question:
-------------
Why ?


Thanks,
Vladimir.