문제

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?

도움이 되었습니까?

해결책

You can use this function of QNetworkRequest class:

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

which returns the raw form of header named headerName.

다른 팁

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++;
    }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top