if (m_url.indexOf("wss://") >= 0) { QSslConfiguration sslConfiguration = m_pWebSocket->sslConfiguration(); sslConfiguration.setPeerVerifyMode(QSslSocket::VerifyPeer); sslConfiguration.setProtocol(QSsl::TlsV1SslV3); m_pWebSocket->setSslConfiguration(sslConfiguration); }
还要安装openssl,并把openssl下libeay32.dll和ssleay32.dll放到qt bin目录下