1) Q_UNUSED 没有使用的参数去掉警告:例子 void someClass::someFunctionCode(const QString & text) { Q_UNUSED( text ); }