[Qt-interest] typedef on the same underlying type and Q_REGISTER_METATYPE
MARTIN Pierre
hickscorp at gmail.com
Tue Sep 13 20:14:52 CEST 2011
> struct Ratio { qreal data; };
> struct PositiveRatio { qreal data; };
> struct NegativeRatio { qreal data; };
> Q_DECLARE_TYPEINFO(Ratio, Q_MOVABLE_TYPE)
> Q_DECLARE_METATYPE(Ratio)
> Q_DECLARE_TYPEINFO...
Appologies, i have found the informations i was looking for about Q_DECLARE_TYPEINFO... However i don't understand how one could register a new POD datatype for instance let's say compatible with assignment, +=, -=, /=, etc without redefining either a template class wrapping it, or something similar...
Anyone has any kind of information about registering aliased types as new types with an independent type ID?
Thanks,
Pierre.
More information about the Qt-interest-old
mailing list