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

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -