我正在开发 QML 节拍器。我使用了一个间隔为 60000/Beats 每分钟的计时器。然而,它并不准确。我怎样才能提高准确性。我应该使用计时器,还是有更好的解决方案?
QElapsedTimer timer;
timer.start();
slowOperation1();
qDebug() << "The slow operation took" << timer.elapsed() << "milliseconds";
Run Code Online (Sandbox Code Playgroud)
http://doc.qt.io/qt-5/qelapsedtimer.html#invalidate
之后qDebug()
我想停止这个计时器.我在那里看不到停止功能,也没有单击属性.
出路是什么?