Reputation: 8499
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?
Upvotes: 1
Views: 86
Reputation: 32685
You can use this function of QNetworkRequest
class:
QByteArray QNetworkRequest::rawHeader ( const QByteArray & headerName ) const
which returns the raw form of header named headerName
.
Upvotes: 1
Reputation: 626
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++;
}
Upvotes: 1