[Interest] QPlugin and RTTI

Thiago Macieira thiago.macieira at intel.com
Mon Jun 23 03:11:23 CEST 2014


Em dom 22 jun 2014, às 14:56:43, Alan Ezust escreveu:
> If all of the classes are QObjects, then qobject_cast() should be used
> instead of dynamic_cast, which is not guaranteed to work across library
> boundaries.

It has the same requirements as QObject: there needs to be something anchoring 
the object to a given library. In QObject and qobject_cast's case, it's the 
meta object (the output of moc); for RTTI and dynamic cast, it's the typeinfo. 
Each must exist in a single library.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list