For ordinary communication involving direct signals and slots, it is enough to simply declare the type in the way described in the Custom Type Example. This example showed how a custom type can be registered with the meta-object system so that it can be used with signal-slot connections between threads. See the source code for the implementation of the createImage() function. The rest of the main() function is concerned with setting a seed for the pseudo-random number generator, creating and showing the window, and setting a default image.
This call is placed here to ensure that the type is registered before any signal-slot connections are made that use it.