diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-18 08:17:20 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-08-29 07:41:26 -0700 |
| commit | 2c86903704413d869131d5ea81951eb8de51639e (patch) | |
| tree | 1bb0af22f336d4f28bd92c1b59066496736aca9a /src/corelib/kernel/qtimer.cpp | |
| parent | a93f02e3ad6f1bd1b2469e709c84196f5a87e449 (diff) | |
Doc: update QTimer::start() to say that it sets the interval
I thought it went without saying...
Fixes: QTBUG-116218
Pick-to: 6.6
Change-Id: I964c2b1e6b834feb9710fffd177c8338f8f1e618
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
| -rw-r--r-- | src/corelib/kernel/qtimer.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index 4502e20a42f..34f23955805 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -200,7 +200,13 @@ void QTimer::start() If the timer is already running, it will be \l{QTimer::stop()}{stopped} and restarted. - If \l singleShot is true, the timer will be activated only once. + If \l singleShot is true, the timer will be activated only once. This is + equivalent to: + + \code + timer.setInterval(msec); + timer.start(); + \endcode \note Keeping the event loop busy with a zero-timer is bound to cause trouble and highly erratic behavior of the UI. @@ -551,7 +557,13 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiv If the timer is already running, it will be \l{QTimer::stop()}{stopped} and restarted. - If \l singleShot is true, the timer will be activated only once. + If \l singleShot is true, the timer will be activated only once. This is + equivalent to: + + \code + timer.setInterval(msec); + timer.start(); + \endcode */ /*! |
