我尝试了这个代码段suggested elsewhere on SO:
var timer = new QTimer();
timer.interval = 100; // set the time in milliseconds
timer.singleShot = true; // in-case if setTimout and false in-case of setInterval
timer.timeout.connect(this, function(){console("in setTimout")});
timer.start();
结果:
ReferenceError: Can't find variable: QTimer
我需要为计时器设置工作吗?