I have the next classes: FoxCom
and FoxComCircle
. In FoxCom
I have the next code:
...
public slots:
void bytesWrite(QByteArray bytes, qint32 requestedTimeout = -1);
...
FoxComCircle * circle;
...
void FoxCom::bytesWrite(QByteArray bytes, qint32 requestedTimeout)
{
QMetaObject::invokeMethod(circle,
//SLOT(bytesToWrite(QByteArray,qint32)),
"bytesToWrite",
Qt::QueuedConnection,
Q_ARG(QByteArray, bytes),
Q_ARG(qint32, requestedTimeout));
}
And in FoxComCircle
:
...
public slots:
void bytesToWrite(QByteArray bytes, qint32 requestedTimeout);
...
void FoxComCircle::bytesToWrite(QByteArray bytes, qint32 requestedTimeout)
{
//some stinky code here
}
And there is the next behaviour: when I comment "bytesToWrite",
and use SLOT(bytesToWrite(QByteArray,qint32)),
I have the next message in the output console when FoxCom::bytesWrite
is called:
QMetaObject::invokeMethod: No such method FoxComCircle::1bytesToWrite(QByteArray
,qint32)(QByteArray,qint32)
But when I use the const char * name directly (as shown in the code above) it works.
Am I doing something wrong?
P.S. FoxCom
and FoxComCircle
are in different threads.
Thanks in advance.