I have a QUrl
as this:
https://www.example.com/index.html#token=SomeToken&user=guest
and I want to obtain the value of the token i.e. SomeToken
. I know about method QUrl::queryItemValue
,so this code must work:
void MainWindow::get_token(QUrl url)
{
url = url.toString().replace("?","#");
QString token = url.queryItemValue("token");
}
but in Qt5
i can't use this method,how can I parse url?