Obsolete Members for QTimer
The following members of class QTimer are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.
Static Public Members
(deprecated in 6.8) void | singleShot(int nsec, const QObject *receiver, const char *member) |
(deprecated in 6.8) void | singleShot(int nsec, Qt::TimerType timerType, const QObject *receiver, const char *member) |
Member Function Documentation
[static, deprecated in 6.8]
void QTimer::singleShot(int nsec, const QObject *receiver, const char *member)
This function is deprecated since 6.8. We strongly advise against using it in new code.
This is an overloaded function.
This static function calls a slot after a given time interval.
It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object.
The receiver is the receiving object and the member is the slot. The time interval is given in the duration object nsec.
Note: In Qt versions prior to 6.8, this function took chrono::milliseconds, not chrono::nanoseconds. The compiler will automatically convert for you, but the conversion may overflow for extremely large milliseconds counts.
Note: This function is reentrant.
See also start().
[static, deprecated in 6.8]
void QTimer::singleShot(int nsec, Qt::TimerType timerType, const QObject *receiver, const char *member)
This function is deprecated since 6.8. We strongly advise against using it in new code.
This is an overloaded function.
This static function calls a slot after a given time interval.
It is very convenient to use this function because you do not need to bother with a timerEvent or create a local QTimer object.
The receiver is the receiving object and the member is the slot. The time interval is given in the duration object nsec. The timerType affects the accuracy of the timer.
Note: In Qt versions prior to 6.8, this function took chrono::milliseconds, not chrono::nanoseconds. The compiler will automatically convert for you, but the conversion may overflow for extremely large milliseconds counts.
Note: This function is reentrant.
See also start().