[Qt-interest] Connecting slots to virtual objects

Thiago Macieira thiago at kde.org
Fri Jul 2 13:22:18 CEST 2010


Em Sexta-feira 2. Julho 2010, às 13.59.50, Dirk Neumann escreveu:
> Now I want to connect to mySignal() inside the constructor of B. An
> expression like

Inside constructors, virtual calls to "this" are not virtual. So you cannot 
call the pure virtual B::myA() from inside B::B().

Sorry, you need to redesign your approach. This is how C++ works.

-- 
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/20100702/6b5d44f0/attachment.bin 


More information about the Qt-interest-old mailing list