有什么可以替代Qtimer的吗?在4.7及以上版本中发现的Qtimer可能不太发达,我有QT4.6.3。我不能偏离/向前移动,所以我想知道4.6qt兼容的计时器?
发布于 2014-06-26 04:47:54
即使在QT3.x中,QTimer也是可用的。
但是,如果需要更简单的东西,可以使用QObject::startTimer()
作为对象,并在类中重新实现QObject::timerEvent()
事件处理程序(必须继承QObject)。
另一种选择是使用QBasicTimer。
有关更多信息,请参见(QT4.6):http://doc.qt.digia.com/4.6/timers.html
https://stackoverflow.com/questions/24430717
复制