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

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -