tarod
14th December 2012, 09:30
Hi,
I found the next code reading the documentation:
QSignalSpy spy(myCustomObject, SIGNAL(mySignal(int, QString, double)));
myCustomObject->doSomething(); // trigger emission of the signal
QList<QVariant> arguments = spy.takeFirst();
QVERIFY(arguments.at(0).type() == QVariant::Int);
QVERIFY(arguments.at(1).type() == QVariant::QString);
QVERIFY(arguments.at(2).type() == QVariant::double);
But I'm having many problems when I want to check if the signal has a std::string type.
Any idea?
Thanks.
I found the next code reading the documentation:
QSignalSpy spy(myCustomObject, SIGNAL(mySignal(int, QString, double)));
myCustomObject->doSomething(); // trigger emission of the signal
QList<QVariant> arguments = spy.takeFirst();
QVERIFY(arguments.at(0).type() == QVariant::Int);
QVERIFY(arguments.at(1).type() == QVariant::QString);
QVERIFY(arguments.at(2).type() == QVariant::double);
But I'm having many problems when I want to check if the signal has a std::string type.
Any idea?
Thanks.