Preface:
Normally we use and the type of signal c ++ groove defined parameters inside are possible qt
But to pass a custom structure to how to get?
If you do not register, then compiled a direct connection is not being given the time to perform the error will not take effect
struct my_Custom
{
...
...
...
}
-
Sign up what this structure in the structure below
Q_DECLARE_METATYPE (my_Custom) -
Add headers #include <QMetaType>
-
Was added over a qRegisterMetaType connect connection <my_Custom> ( "my_Custom");
connect (A,&AA::signal(my_Custom),B,&BB::slot(my_Custom))
This can be registered on the qt know what your body structure or else he did not know the signal can not be connected to the slot according to the parameters