summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qtimer.cpp
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2024-09-02 22:24:10 +0300
committerAhmad Samir <a.samirh78@gmail.com>2024-09-06 19:52:23 +0300
commite1fdfe9da8ccdeed9af602897232a513884b0515 (patch)
treeda4ae61a0bb10de27862c53fcfeb56695bf1b09c /src/corelib/kernel/qtimer.cpp
parenta84b79df0fb8a92b17a39bbf706714e93de9d6fc (diff)
docs: promote QBasicTimer usage by making it more visible
Deduplicate some API docs. Mention that it's a RAII class, to make it more appealing to users. Copied the "RAII" note and link from QSemaphoreReleaser's API docs. Pick-to: 6.8 Change-Id: I53ced6eb7c2ab55ffc04e70c250b5f5639406911 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r--src/corelib/kernel/qtimer.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 54a19c30503..05501c282ba 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -104,15 +104,7 @@ QT_BEGIN_NAMESPACE
\c std::numeric_limits<int>::max()). If you only need millisecond
resolution and ±24 days range, you can continue to use QTimer.
- Another alternative is to call QObject::startTimer()
- for your object and reimplement the QObject::timerEvent() event
- handler in your class (which must inherit QObject). The
- disadvantage is that timerEvent() does not support such
- high-level features as single-shot timers or signals.
-
- Another alternative is QBasicTimer. It is typically less
- cumbersome than using QObject::startTimer()
- directly. See \l{Timers} for an overview of all three approaches.
+ \include timers-common.qdocinc q-chrono-timer-alternatives
Some operating systems limit the number of timers that may be
used; Qt tries to work around these limitations.