[Interest] QTest + QSignalSpy doesn't seem to work with deferred signals

Bob Hood bhood2 at comcast.net
Wed Jan 18 19:11:03 CET 2017


On 1/18/2017 10:52 AM, Giuseppe D'Angelo wrote:
> Il 18/01/2017 18:16, Bob Hood ha scritto:
>> Is QTest capable of testing deferred results--i.e., evaluating tests results
>> after the even loop has run again--or can only synchronous actions be tested?
>> I know people have used qWait() and such in the past, or I supposed I could
>> manually invoke the event loop within the unit test until signals are emitted,
>> but I was wondering if QTest has been designed to handle that in a canonical
>> fashion I'm not immediately seeing.
> Just use QTRY_COMPARE instead of QCOMPARE.

Oh, I wasn't aware of that macro.  I'll give that a go.

Mille grazie, Giuseppe.  :)




More information about the Interest mailing list