Quantcast
Channel: Qt DevNet forums: Qt WebKit
Viewing all articles
Browse latest Browse all 542

QWebView - Show HTTP POST request

$
0
0
Hi, try using QWebView for login into a website (formular with HTTP POST). Test thies: POST values e_user=Max e_pwd=Secret void MainWindow::Button_clicked() {     QByteArray postData("e_user=Max&e_pwd=Secret");     QNetworkRequest netRequest;     netRequest.setUrl(QUrl("http://example.com/do_login.php"));     netRequest.setHeader(QNetworkRequest::ContentTypeHeader, "text/html; charset=UTF-8");       ui->webView->load(netRequest, QNetworkAccessManager::PostOperation, postData); } I can’t log into the website… There is also QNetworkAccessManager’s post function… but there i get a pointer of QNetworkReply, don’t know how show this at *QWebView *… Therefore i needed a little bit help… Thank you! Boris

Viewing all articles
Browse latest Browse all 542

Trending Articles