Hi,

I am using QT4 on Fedora 10. I am unable to run a timer event. Please help.
Attaching my code.

void MainWindow::test_func()
{
QMessageBox::information(this,"Test", "Testing Timer","Hi");
}

void MainWindow:n_actionSpatial_Connection_triggered()
{
QTimer *timer = new QTimer(this);
connect(timer,SIGNAL(timeout()),this,SLOT(test_fun c()));
timer->start(1000);
}

Basically I want to start a timer on a click event and the timer should call a function till the timer is stopped.

Thanks in advance...