[Interest] QSharedPointer and qRegisterMetaType
Igor Mironchik
igor.mironchik at gmail.com
Fri Jan 23 18:45:16 CET 2015
On Fri, 23 Jan 2015 20:25:03 +0300, Carsten Schneemann
<cschneemann at yahoo.com> wrote:
> Hi Igor,
>
> if you're using the code quoted in your message then you have simply
> registered your pointer class with the wrong type name. If you use
> qRegisterMetaType<SharedInt>("SharedInt");
> then things should work.
Ah, great thanks... Now it works...
>
> You should also be careful with typedefs like "SharedInt" for your
> pointer class. Qt's meta type system is largely based on string
> comparison, so even if a type is just an alias of another, moc might not
> have taken this into account and you will get an "incompatible
> sender/receiver arguments" warning at runtime.
>
> Carsten.
--
Best Regards,
Igor Mironchik.
More information about the Interest
mailing list