Several signals and single slot
-
Is there any way to connect several signals to single slot and this slot must be invoked only if ALL of that signals were emitted?
-
It doesn't work. Programm emits first signal in function 'a', the second signal in function 'b' and the third in function 'c'. I have connected this signals with intermediate slot. This slot emits signal that connected with the my main slot. What is wrong?
-
@connect(this, SIGNAL(yandexParsed()), this, SLOT(parsingFinished()));
connect(this, SIGNAL(metaParsed()), this, SLOT(parsingFinished()));
connect(this, SIGNAL(i_uaParsed()), this, SLOT(parsingFinished()));@
3 signals connected to intermediate slot parsingFinished();@connect(this, SIGNAL(pagesParsed()), this, SLOT(loadProgress()));
@slot parsingFinished() emitted signal pagesParsed() that invoked the main slot loadProgress().
During execution of a programm I have 3 invoking of the main slot but I want to have only one. -
loadProgress() is the main slot. Aha, so I must add a counter that will count number of calls and if this number equal to 3 only then I will invoke main slot?
-
Ok, thank you. It is the only way to solve this problem, yes?