错误 error: ‘connect’ was not declared in this scope connect(timer, SIGNAL(timeout()), this, SLOT(updateslot())); 解决方法 类要继承 QObject类