添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Welcome to Qt Centre .

Qt Centre is a community site devoted to programming in C++ using the Qt framework . Over 90 percent of questions asked here gets answered. If you are looking for information about Qt related issue — register and post your question.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today !

If you have any problems with the registration process or your account login, please contact us .

Hi, i need to connect with https server and then logging on site. It's my current code:
Qt Code: Switch view
  1. void Http_request::Logging(){
  2. request.setUrl(QUrl("https://examplesite.com"));
  3. request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/x-www-form-urlencoded"));
  4. QString dataRequest = "ACCOUNTLOGIN_ACCOUNTNAME=login&ACCOUNTLOGIN_PASSWORD=pass";
  5. reply = manager->post(request, dataRequest.toAscii());
  6. }
void Http_request::Logging(){
    request.setUrl(QUrl("https://examplesite.com"));
    request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/x-www-form-urlencoded"));
    QString dataRequest = "ACCOUNTLOGIN_ACCOUNTNAME=login&ACCOUNTLOGIN_PASSWORD=pass";
    reply = manager->post(request, dataRequest.toAscii());
To copy to clipboard, switch view to plain text mode 
But i get some warnings:
Qt Code: Switch view
  1. QSslSocket: cannot call unresolved function SSLv3_client_method
  2. QSslSocket: cannot call unresolved function SSL_CTX_new
  3. QSslSocket: cannot call unresolved function SSL_library_init
  4. QSslSocket: cannot call unresolved function ERR_get_error
  5. QSslSocket: cannot call unresolved function ERR_error_string
QSslSocket: cannot call unresolved function SSLv3_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_error_string
To copy to clipboard, switch view to plain text mode
and don't recive any bytes of site. I tried to fix that by:
QSslConfiguration sslConfiguration = reply->sslConfiguration();
but it doesn't work correct, i recive some errors that 'QNetworkReply' class has no member named 'sslConfiguration'. So i'm looking for the simplest way to resolve problem with this secured server. Can anyone have some idea how may i fix it?
Yours Trok
Your biological and technological distinctiveness will be added to our own. Resistance is futile.
Please ask Qt related questions on the forum and not using private messages or visitor messages.