QTestEventLoop crash in debug mode



  • Hi.I have created a QML application which uses Qt Test Framework to unit test my class APIs.(Have integrated Qt Test Framework in a QML application)
    Inside of my test cases i use QTestEventLoop::instance().enterLoop(1) to wait for signal emission.
    However ,this thing works fine in Release mode but my application crashes on executing the above statement in debug mode.
    Read somewhere that its not advised to use event loop inside another one.In my case my main has its event loop for processing GUI related and other stuff in addition to one am using in my unit test case.
    Have tried other alternatives like QTest::qwait() /qSleep() etc ,creating timer etc but in that case though my app doesnt crash but my test case also fails (seems signal not emitted etc).
    Any suggestions as to why its crashing only in debug mode or any another way out to achieve functionality for QTestEventLoop.
    Thanks



  • Anyone knowing any answers for the issue?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.