[Qt-interest] Comparing two QMetaObjects
Thiago Macieira
thiago at kde.org
Mon Feb 7 15:00:11 CET 2011
On Monday, 7 de February de 2011 11:45:07 Gustavo de Sá Carvalho Honorato
wrote:
> > For QMetaObject, simply compare pointers.
>
> Suppose I have a object 'a' of a class 'A'. It is guaranteed that
> a->metaObject() will aways return a pointer to A::staticMetaObject?
> Then I can aways compare using:
>
> a->metaObject() !
No.
That requires class A to have a Q_OBJECT macro. Most classes do, but some
QObject-derived classes don't.
--
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: 188 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110207/470e2dd6/attachment.bin
More information about the Qt-interest-old
mailing list