Philip Rollins
Philip Rollins

Reputation: 1291

Qt run at certain time?

Is there a easy way to call a event at a given time in Qt? Or do I need to implement some loop to check the time?

Any advice on how to do this would be greatly appreciated, even if it's not using Qt

Upvotes: 0

Views: 1053

Answers (1)

Arun
Arun

Reputation: 2092

QTimer would help.

Something like this:

    QTImer *timer = new QTimer(this);
    timer->setInterval(1000);
    connect(timer, SIGNAL(timeout()), this, SLOT(timerTimeout()));

Upvotes: 2

Related Questions