diff options
Diffstat (limited to 'src/corelib/kernel/qbasictimer.cpp')
-rw-r--r-- | src/corelib/kernel/qbasictimer.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/corelib/kernel/qbasictimer.cpp b/src/corelib/kernel/qbasictimer.cpp index 8efeea6fae..d91c5a9ffe 100644 --- a/src/corelib/kernel/qbasictimer.cpp +++ b/src/corelib/kernel/qbasictimer.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "qbasictimer.h" -#include "qcoreapplication.h" #include "qabstracteventdispatcher.h" QT_BEGIN_NAMESPACE @@ -121,6 +120,24 @@ void QBasicTimer::start(int msec, QObject *obj) } /*! + \overload + + Starts (or restarts) the timer with a \a msec milliseconds timeout and the + given \a timerType. See Qt::TimerType for information on the different + timer types. + + The given \a object will receive timer events. + + \sa stop() isActive() QObject::timerEvent() Qt::TimerType + */ +void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj) +{ + stop(); + if (obj) + id = obj->startTimer(msec, timerType); +} + +/*! Stops the timer. \sa start() isActive() |