Home · Modules · Classes · Namespaces · Functions

QxtTimer Class Reference
[QxtCore module]

The QxtTimer class extends QTimer. More...

    #include <QxtTimer>

Inherits QTimer.

Public Functions

Static Public Members

Additional Inherited Members


Detailed Description

The QxtTimer class extends QTimer.

QxtTimer extends QTimer with capability to call a slot after with given parameters after a given time interval.

Example usage:

    QxtTimer::singleShot(500, widget, SLOT(setWindowTitle(QString)), QString("Window Title"));

Member Function Documentation

QxtTimer::QxtTimer ( QObject * parent = 0 )

Constructs a new QxtTimer with parent.

QxtTimer::~QxtTimer ()   [virtual]

Destructs the timer.

void QxtTimer::singleShot ( int msec, QObject * receiver, const char * member, const QVariant & arg0, const QVariant & arg1 = QVariant(), const QVariant & arg2 = QVariant(), const QVariant & arg3 = QVariant(), const QVariant & arg4 = QVariant(), const QVariant & arg5 = QVariant(), const QVariant & arg6 = QVariant(), const QVariant & arg7 = QVariant(), const QVariant & arg8 = QVariant(), const QVariant & arg9 = QVariant() )   [static]

This static function calls a slot with given parameters 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.

You can pass up to ten arguments (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 and arg9).

The receiver is the receiving object and the member is the slot. The time interval is msec milliseconds.


Copyright © 2007-2010 Qxt Foundation
Qxt 0.6.1