Hi, I was wondering if someone could clear something up for me here. I have a User class that holds basic info like name etc that I want to load per user, it another function I have linked up some the signals emitted from the class to the slots in the constrctor. It looks something like this.
connect(userA, SIGNAL(isLoaded()), this, SLOT(onALoaded()));
connect(userB, SIGNAL(isLoaded()), this, SLOT(onBLoaded()));
}
UserData* userA;
UserData* userB
private slots:
void onALoaded()
{
//some A stuff
}
void onBLoaded()
{
//some B stuff
}
connect(userA, SIGNAL(isLoaded()), this, SLOT(onALoaded()));
connect(userB, SIGNAL(isLoaded()), this, SLOT(onBLoaded()));
}
UserData* userA;
UserData* userB
private slots:
void onALoaded()
{
//some A stuff
}
void onBLoaded()
{
//some B stuff
}
To copy to clipboard, switch view to plain text mode
What I am finding is that both slots are firing even though the signal originates from two different objects. This obviously cannot be correct, this would mean every push button defined would fire every slot a push button is connected too, so what could have gone wrong in my case?
Thanks
Bookmarks