I want to use signals and slots in my program, but unfortunately they should be used for transmitting several different data types (e.g. QString, double, etc.) and I don't want to write twenty different slots just because I need one for each data type. But when I want to declare a slot like
template <typename t>
void Slot1(t data);
QT tells me that it is not possible to use templates in signals and slots. Is there a workaround? Or can my approach simply improved?
QVariant
? – Baer