I have a signal that I want to connect to two slots but execute just one slot at a time. That is to say I have two slots across different files and I want slot 1 to be called first. Later when I emit the same signal again, I want the slot 2 to be called, not the slot 1 this time.
In file 1:
connect(...,SIGNAL(mySignal),...,SLOT(mySlot1()));
In file 2:
connect(...,SIGNAL(mySignal),...,SLOT(mySlot2()));
At first I emit the signal, then I want mySlot1() , to be called alone. Next time when I emit the same signal, I want mySlot2() to be called alone. As is evident, both take the same arguments. I don't want to create a new signal (which would be just like the already made mySignal) for it. Is this possible ? What can I do ?