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

c# - Sort XmlNodeList with a specific Node value -

Android Java.Lang.RuntimeException : Unable to start activity Component Info -

actionscript 3 - Equivalent to moveReceived in ElectroServer 5 -