Here is an idea that could work in this case: override the newConnection signal in your QTcpServer subclass.
If you do this, the objects associated with your server instance will not receive the QTcpServer "version" of this signal, only the one that you emit directly from your subclass.
Here's a proof of concept: class A is a QTcpServer , foo is the signal you are trying to βcaptureβ, bar is just another (hypothetical) QTcpServer signal that you put on No need to touch.
class A: public QObject { Q_OBJECT public: A() {}; virtual void doit() { qDebug() << "A::doit"; emit foo(1); emit bar(1); } signals: void foo(int); void bar(int); };
Class B is your subclass. Note that it overrides the foo signal, but does nothing for bar .
class B: public A { Q_OBJECT public: B() {}; virtual void doit() { qDebug() << "B::doit"; emit foo(2); emit bar(2); } signals: void foo(int); };
Class C is a potential client that connects signals / slots to instance B in the same way as for instance A
class C: public QObject { Q_OBJECT public: C() { B *b = new B; connect(b, SIGNAL(foo(int)), this, SLOT(foo(int))); connect(b, SIGNAL(bar(int)), this, SLOT(bar(int))); b->doit(); b->A::doit();
Here is the result of constructing a C :
B::doit // this is /* 1 */ foo: 2 bar: 2 A::doit // this is /* 2 */ bar: 1
... and nothing else. A emit foo(1) not connected to the C foo slot, it will never come to C A emit bar(1) worked as expected, this signal is not affected.
With this setup, you can issue newConnection when your class is ready, the QTcpServer version of the signal will not be received by your user objects.