Text + variable in qDebug -
i want combine text , variable in qdebug:
qstring city_name = "london"; qdebug() << qstring("you choose city:").arg(city_name);
it doesn't work , don't know why. error is:
qstring::arg: argument missing: choose city:, ?????
add %1:
qstring city_name = "london"; qdebug() << qstring("you choose city: %1").arg(city_name);
Comments
Post a Comment