我想在qDebug中结合文本和变量:
QString city_name = "London";
qDebug() << QString("You choose CITY:").arg(city_name);
它不工作,我不知道为什么。错误:QString::arg: Argument missing: You choose CITY:, ?????
添加%1:
QString city_name = "London";
qDebug() << QString("You choose CITY: %1").arg(city_name);