Quantcast
Viewing all articles
Browse latest Browse all 13965

Problem with using QUrl class

Hello, everyone, I need to use dynamical patterns in my url address, but i have a problem with this. For example: when I use this declaration of my variable QUrl url( "http://10.1.11.183:20/comm?cmd=update_text" ); My program works normal. But when I try to declare in the next way:         QString comm_string(QString("http://%1:%2/comm?cmd=%3")                  .arg(comm_host)                  .arg(comm_port)                  .arg(comm_function));         QUrl url( comm_string); My program doesn’t work normal. I see, that url normal recognize the string: qDebug() << url.toString(); Gives this result: http://10.1.11.183:20/comm?cmd=update_text What do I do wrong?? Thanks for your help

Viewing all articles
Browse latest Browse all 13965