[Qt-interest] signals and slots....revisited...

Thiago Macieira thiago at kde.org
Tue Mar 15 11:23:17 CET 2011


Em terça-feira, 15 de março de 2011, às 08:54:05, Arnold Krille escreveu:
> I am under the impression that you can only connect to slots you "see", so
> from the outside of the object, only the public slots can be used for
> connections. But I might be wrong…

Unfortunately, you are.

Only the compiler knows about the protection levels. Since QObject is doing 
the connecting at runtime, all slots can be connected to and invoked, 
regardless of the protection.

-- 
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/20110315/c86e2ad7/attachment.bin 


More information about the Qt-interest-old mailing list