QNetworkRequest request(QUrl("http://site.net/index.php"));
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
QUrlQuery postData;
postData.addQueryItem("username", login);
postData.addQueryItem("password", pass);
postData.addQueryItem("loginbtn", "Log in");
QNetworkAccessManager * pManager = new QNetworkAccessManager(this);
QNetworkReply * reply = pManager->post(request, postData.toString(QUrl::FullyEncoded).toUtf8());
connect(reply, SIGNAL(finished()), SLOT(sendingFinished()));