the strange phenomenon: the emiited signal cannot be received by the slot function
file1.cpp:
Code:
connect(this, SIGNAL(newOrbCorrections(QList<t_orbCorr>)),
BNC_CORE, SLOT(slotNewOrbCorrections(QList<t_orbCorr>)));
file2.cpp:
Code:
void t_bncCore
::slotNewCorrLine(QString line,
QString staID, bncTime coTime
) {
……………………………………
}
void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) {
……………………………………………………
}
main.cpp
Code:
{
emit newCorrLine("ddd", _staID, _lastTime);
emit newOrbCorrections(orbCorrections);
}
the slot function slotNewCorrLine can be correctly called ,but the function slotNewOrbCorrections can not be called.
I am very confusing about the phenomenon.
Looking forward to your answer,Thank you very much.
Re: the strange phenomenon: the emiited signal cannot be received by the slot functio
Do you get any warnings in the console during runtime? Do your sender and receiver live in the same thread?
Re: the strange phenomenon: the emiited signal cannot be received by the slot functio
according to you suggestions,I find:
1. the warnings : QObject::connect: Cannot queue arguments of type 'QList<t_orbCorr>'
2. the sender and receiver are not in the same thread
Added after 21 minutes:
Quote:
Originally Posted by
wysota
Do you get any warnings in the console during runtime? Do your sender and receiver live in the same thread?
Thank you very much ,with your suggestions,I solve the problem by registering the type 'QList<t_orbCorr>'.