I am trying to connect to a signal in a base class. The pointer is the type of the base class but points to an object of the derived class. My classes are declared similar to the following:

Qt Code:
  1. class Base : public QObject
  2. {
  3. Q_OBJECT
  4. public:
  5. Base();
  6. signals:
  7. void BaseSignal(char Arg);
  8. };
  9.  
  10. class DerivA : public Base
  11. {
  12. Q_OBJECT
  13. public:
  14. DerivA();
  15.  
  16. void Alert() { emit BaseSignal('A') };
  17. };
  18.  
  19. class DerivB : public Base
  20. {
  21. Q_OBJECT
  22. public:
  23. DerivB();
  24.  
  25. void Alert() { emit BaseSignal('B') };
  26. };
To copy to clipboard, switch view to plain text mode 

Connect fails if I pass a DerivA or DerivB pointer to a function like the following:

Qt Code:
  1. bool SomeObject::mbrConnect(Base *B)
  2. {
  3. return QObject::connect(B, SIGNAL(BaseSignal(char)), this, SLOT(Handler(char));
  4. }
To copy to clipboard, switch view to plain text mode 

It seems it is too smart for its own good, being able to identify the real type of the Base pointer in the Connect Fail output message. For example, passing mbrConnect a DerivA pointer would output the following:

Object::connect: No such signal DerivA::BaseSignal(char)
How do I solve this?