QTimer question



  • If I call:

    some_timer.blockSignals(true);
    
    [do so processing]
    
    some_timer.start();
    some_timer.blockSignals(false);
    

    Will that work? I ran into a situation where the [do some processing] part took more than the defined interval for the timer, causing a timeout event to be queued up before I could restart the timer. I just want to make sure that the call to start() will effectively restart the timer even if I am blocking signals.

    Thanks!


  • Moderators

    Hi! I don't see a problem here, but I don't understand why you don't just stop the timer before [some processing] and restart it afterwards.


  • Qt Champions 2016

    Hi,
    You should get a single timer event (assuming the timer expires at least once).



  • @Wieland actually, that's exactly what I ended up doing. Not sure why I didn't think of that up front.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.