网站首页
编程语言
数据库
系统相关
其他分享
编程问答
frameCount
2024-12-16
实现获取当前帧率并在QML中显示
//fpscounter.h#ifndefFPSCOUNTER_H#defineFPSCOUNTER_H#include<QObject>#include<QQuickItem>#include<QElapsedTimer>classFpsCounter:publicQQuickItem{Q_OBJECTQ_PROPERTY(qrealfpsREADfpsNOTIFYfpsChanged)public:expl