Question

I have a QWebView component in my Qt widget application. And I have already created a network manager to handle requests from the QWebView.

What I want to do is catching the values of the web form inside QWebView, up to this point of time I have the QNetworkRequest instance of every network request.

How to extract the form values from the QNetworkRequest instance?

Was it helpful?

Solution

You can use this function of QNetworkRequest class:

QByteArray QNetworkRequest::rawHeader ( const QByteArray & headerName ) const

which returns the raw form of header named headerName.

OTHER TIPS

Are you talking about the values on the get method?

    int i= 0;
    QPair<QString , QString > values;
    while( i < ui->webView->url().queryItems().count() )
    {
        values =  ui->webView->url().queryItems().at( i );
        i++;
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top