C++ (Qt)struct MySignalData{ bool processed; QString payload;}; typedef QSharedPointer<MySignalData> MySignalDataPtr;Q_DECLARE_METATYPE(MySignalDataPtr) .... int main(int argc, char **argv){ qRegisterMetaType<MySignalDataPtr>(); .... signals: void mySignal(MySignalDataPtr);.... void mySlot(MySignalDataPtr data){ if (data->processed) return; processData(data); data->processed = true;}