timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(action())); timer->start(1000);