diff options
Diffstat (limited to 'src/corelib/kernel/qtimer.cpp')
-rw-r--r-- | src/corelib/kernel/qtimer.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index c3504943c4..802c8d72f6 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -571,6 +571,48 @@ void QTimer::singleShot(int msec, Qt::TimerType timerType, const QObject *receiv */ /*! + \fn template<typename Functor> QMetaObject::Connection connectTo(Functor functor, Qt::ConnectionType connectionType = Qt::AutoConnection) + \since 5.12 + \overload + + Creates a connection from the timeout() signal to \a functor, and returns a + handle to the connection. + + This method is provided for convenience. + It's equivalent to calling \c {QObject::connect(timer, &QTimer::timeout, timer, functor, connectionType)}. + + \sa QObject::connect(), timeout() +*/ + +/*! + \fn template<typename Functor> QMetaObject::Connection connectTo(QObject *context, Functor functor, Qt::ConnectionType connectionType = Qt::AutoConnection) + \since 5.12 + \overload connectTo() + + Creates a connection from the timeout() signal to \a functor to be placed in a specific + event loop of \a context, and returns a handle to the connection. + + This method is provided for convenience. It's equivalent to calling + \c {QObject::connect(timer, &QTimer::timeout, context, functor, connectionType)}. + + \sa QObject::connect(), timeout() +*/ + +/*! + \fn template<typename PointerToMemberFunction> QMetaObject::Connection connectTo(QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType connectionType = Qt::AutoConnection) + \since 5.12 + \overload connectTo() + + Creates a connection from the timeout() signal to the \a method in the \a receiver object. Returns + a handle to the connection. + + This method is provided for convenience. It's equivalent to calling + \c {QObject::connect(timer, &QTimer::timeout, receiver, method, connectionType)}. + + \sa QObject::connect(), timeout() +*/ + +/*! \fn void QTimer::start(std::chrono::milliseconds msec) \since 5.8 \overload |