Use some timer in sender - QTimer



  • Hi it's possible to include in my signal/slot in sender some timer to repeat each 1 second or 5 second and start this timer.
    The signal slot mine is this:
    connect (ui->botonpaint,SIGNAL(clicked()),this,SLOT(paint()));


  • Qt Champions 2016

    Hi a timer can signal timeout() with no parameters so it call any other slot that has
    a matching signature.

    So a timer can call update() to make something redraw and stuff like that.

    Im not sure what you are asking with "include in my signal/slot in sender some timer to repeat each 1 second or 5 second "

    When you start the timer you give it its speed.

    timer->start(5000); // 5 secs


Log in to reply
 

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