void fun(int arg1,int arg2) { Q_UNUSED(arg1); Q_UNUSED(arg2); } Q_UNUSED()宏可以去掉编译器因形参未使用产生的警告,可以规避代码静态检查工具未使用参数检测。