Obsolete Members for QBasicTimer

The following members of class QBasicTimer are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(since 6.5, deprecated) void start(int duration, QObject *object)
(since 6.5, deprecated) void start(int msec, Qt::TimerType timerType, QObject *obj)
(deprecated) int timerId() const

Member Function Documentation

[since 6.5, deprecated] void QBasicTimer::start(int duration, QObject *object)

This function is deprecated. We strongly advise against using it in new code.

Starts (or restarts) the timer with a duration timeout. The timer will be a Qt::CoarseTimer. See Qt::TimerType for information on the different timer types.

The given object will receive timer events.

Note: Starting from Qt 6.9 this method takes std::chrono::nanoseconds, before that it took std::chrono::milliseconds. This change is backwards compatible.

This function was introduced in Qt 6.5.

See also stop(), isActive(), QObject::timerEvent(), and Qt::CoarseTimer.

[since 6.5, deprecated] void QBasicTimer::start(int msec, Qt::TimerType timerType, QObject *obj)

This function is deprecated. We strongly advise against using it in new code.

This is an overloaded function.

Use chrono overload instead.

This function was introduced in Qt 6.5.

[noexcept, deprecated] int QBasicTimer::timerId() const

This function is deprecated. We strongly advise against using it in new code.

Returns the timer's ID.

In new code use id() instead.

See also QTimerEvent::timerId().