I have created a class for handling data received from slots and have created several overloaded methods of the same name with a different parameter type.
Is it possible to use overloaded methods as slots?
I have two declarations so far:
void notify(uint uintData);
void notify(float fltData);
However the 2nd produces a warning at runtime:
QObject::connect: No such slot clsSlot::notify(float)
Found this which implies it should work: http://doc.qt.io/qt-5/signalsandslots.html
But it doesn't...
From the class 'clsSlot':
public slots:
void notify(uint uintValue);
void notify(float fltValue);
Implementation:
void clsSlot::notify(float fltValue) {
notifyPrimitive(meID, QString::number(fltValue));
}
void clsSlot::notify(uint uintValue) {
notifyPrimitive(meID, QString::number(uinValue));
}
Connect call:
QObject::connect(Fcs::Mount::GetRef()
,&Fcs::Mount::signalElevation
,pobjHandler, &clsSlot::notify);
pobjHandler is an pointer to an instance of clsSlot.