Qt 6.11 is out! See what's new in the release
blog
How to make QTimer fire immediately on start?
-
I need to have a QTimer that fires every 10s, however, the first invocation of the slot is 10s after the timer is started.
QTimer timer; connect(timer, SIGNAL(timeout()), this, SLOT(timeoutFired())); timer.setInterval(10000); timer.start();Is it possible to have the timer fire immediately on calling
start()and have the rest of the notifications after 10s? -
I need to have a QTimer that fires every 10s, however, the first invocation of the slot is 10s after the timer is started.
QTimer timer; connect(timer, SIGNAL(timeout()), this, SLOT(timeoutFired())); timer.setInterval(10000); timer.start();Is it possible to have the timer fire immediately on calling
start()and have the rest of the notifications after 10s?