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