ReferenceError:找不到变量:QTimer - 为什么Qtimer不能用于我的脚本?

时间:2016-03-29 14:01:49

标签: qt qtscript

我尝试了这个代码段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

我需要为计时器设置工作吗?

0 个答案:

没有答案