Qt每隔N秒运行一个函数

阅读 68

2023-04-11


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.


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


相关推荐

精彩评论(0)

0 0 举报