use QTRY_VERIFY maybe? http://qt-project.org/doc/qt-5/qtest.html#QTRY_VERIFY