Hi,
I found the next code reading the documentation:
myCustomObject->doSomething(); // trigger emission of the signal
QList<QVariant> arguments = spy.takeFirst();
QVERIFY
(arguments.
at(0).
type() == QVariant::Int);
QVERIFY
(arguments.
at(2).
type() == QVariant::double);
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);
To copy to clipboard, switch view to plain text mode
But I'm having many problems when I want to check if the signal has a std::string type.
Any idea?
Thanks.
Bookmarks