I have a QUrl as this: https://www.example.com/success.html#token=XYZ&user=guest
and I want to obtain the value of the token i.e. XYZ
My current code
QString token = url.queryItemValue(QString("token"));
cout << QString("access token is %1").arg(access_token);
returns an empty string.