I am trying to connect two slots with on signal. here is my header file where I have defined my signals
class loginChecker : public QObject
{
Q_OBJECT
public:
static loginChecker *instance(void);
signals:
void loginid();
void loginemail();
private:
loginChecker(void) {}
~loginChecker(void) {}
private:
static loginChecker *s_instance;
};
it is sigalton class. here is my slot which is another signalton class named as loginProcess
the slot name in this class in getUserData(QString& userData)
in The loginChecker.cpp
I am trying to connect these declared signals with getUserData(QString userData)
slot
loginProcess *lp;
lp = loginProcess::instance();
here I am accessing instance of loginProcess signalton class which has slot
These are two ways I am trying to connect these signal and slot but none are working
QObject::connect(s_instance, SIGNAL(loginid()), es, SLOT(getUserData(userid)));
this is throwing no such slot error at runtime
`QObject::connect(s_instance, &esCoreAuthenticator::loginid, es, &loginProcess::getUserData(uid));`
this is thworing this error cannot call member function 'void loginProcess::getUserData(const QString&)' without object
at compile time