Qt每隔N秒运行一个函数

QTimer* mTimer = new QTimer(this);
connect(mTimer,SIGNAL(timeout()),this,SLOT(move()));
mTimer->start(1000);//From then on, the move() slot is called every second.

一年前用它跑了个贪吃蛇,一年后用它做了下自动重连主机

你可能感兴趣的:(C++,c,C#,qt)