Doc: recommend using QVERIFY with QSignalSpy::wait, so people don't forget.

Change-Id: I63a04b64368a4b8aa6cfea88780b8dd6ba38b8bf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
David Faure 2012-12-12 01:01:17 +01:00 committed by The Qt Project
parent 07e0c4c98d
commit e2ad422e88
2 changed files with 7 additions and 0 deletions

View File

@ -79,3 +79,7 @@ QModelIndex result = qvariant_cast<QModelIndex>(spy.at(0).at(0));
//! [4]
QSignalSpy spy(myPushButton, SIGNAL(clicked(bool)));
//! [4]
//! [5]
QVERIFY(spy.wait(1000));
//! [5]

View File

@ -94,4 +94,7 @@
Optionally the event loop can return earlier on a \a timeout (in milliseconds).
Returns true if the signal was emitted at least once in \a timeout milliseconds, otherwise returns false.
Example:
\snippet code/doc_src_qsignalspy.cpp 5
*/