[Qt-interest] Connect signal to slot with derived parameter

Thiago Macieira thiago at kde.org
Fri Oct 29 14:15:17 CEST 2010


On Thursday, 28 de October de 2010 11:14:18 Andras Toth wrote:
> Qt Documentation just says "The signature of a signal must match the
> signature  of the receiving slot." In my opinion, these signatures  should
> be matching, since directly  calling SomeObject::slot1() with a pointer to
> an instance of Derived is permitted.

Maybe it should, but the fact is that it doesn't.

The match should be exact: it must be the actual pointer type, not any derived 
or base class.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101029/17492cf6/attachment.bin 


More information about the Qt-interest-old mailing list