On sexta-feira, 26 de julho de 2013 09:22:07, Alexander Syvak wrote: > Why is it sufficient then to use Q_DECLARE_METATYPE for any template using > the declared type?
Because those template functions you referred to will do the registration for you if necessary, before accessing the information that is stored with the registration (namely, the functions to create and destroy). > qRegisterMetaType only puts the type to be registered into customTypes > vector registering constructor and destructor for the type with an ID > (optionally an user may register operator>> and operator<< for the type). > Why is it needed to use queued signal and slot connections and > QObject::property() API? Because at that point there is no code that will do the registration for you. It needs to access the constructor and destructor and all it knows at that point is the name of the type (as found in the meta object). This is fixed in Qt 5.0. > Furthermore, Q_OBJECT is required for a type using slots/signals. QObject > does not meet CopyConstructible requirement for using either > Q_DECLARE_METATYPE or qRegisterMetaType. Correct. That is not a question. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest