void YourClassName::requestFinished(QNetworkReply* reply) {
if (reply->error() == QNetworkReply::NoError) { // Check the network reply for errors
QByteArray bArray = reply->readAll();
QString strReply = QString::fromUtf8(bArray);
if(state==REQUESTCODE) { //it is a response from a RequestCode action.
appCode = new QString(strReply.mid(5));
//with "mid" we strip the first 5 characters, cause we don't need it, and save locally, the app code.
launchAuthBrowser(); //we can call the brower now
}
// ...
}