From the Qt QtMetaType documentation :
The QMetaType class manages the type name in a meta-object system. The class is used as an assistant for marshall types in QVariant and in the queue of signals and slots. This associates the type name with the type so that it can be created and destroyed dynamically at runtime. Declare new types with Q_DECLARE_METATYPE () before making them available for QVariant and other template-based functions. Calling qRegisterMetaType () to create a type is available for use without template functions, such as a queued signal and slots.
Registering your custom type with qRegisterMetaType () allows you to use it in signals and slots, as well as other functions not based on templates
source
share