在QML中使用WebView,运行过程中单击没有效果,并提示以下错误,
QSslSocket: cannot call unresolved function SSLv23_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
经查阅,在http://codeblog.vurdalakov.net/2009/11/solution-qsslsocket-cannot-call.html
这里面看到了解决办法,经过测试解决问题了!
步骤如下:
You need to install OpenSSL Win32 or Win64 binaries.
你需要安装OpenSSL库;
1、Open Win32 OpenSSL Installation Project page.
首先打开OpenSSL Installation Project网页;
2、Download the latest "light" Win32 or Win64 installation package, for example "Win32 OpenSSL v0.9.8l Light".
下载安装包,我下载的是:Win32 OpenSSL v1.0.1c Light安装包,随着时间的推进,这个版本会不断更新的!!
3、Install it to any location. Ignore "Microsoft Visual C++ 2008 Redistributables" warning (click OK) and select copying OpenSSL DLLs to "The OpenSSL binaries (\bin) directory".
安装(exe文件)到本地,我是安装到C盘下,并且在安装过程中选择将库安装到OpenSSL的安装目录(/bin)下面。
4、Copy libeay32.dll and ssleay32.dll from the \bin folder to the same place where your QtNetwork4.dll or QtNetworkd4.dll is located.
将libeay32.dll 和 ssleay32.dll 文件拷贝到QtSDK中的存放有QtNetwork4.dll和QtNetworkd4.dll的文件目录下。我的是
C:\QtSDK\Desktop\Qt\4.8.0\mingw\bin,这个主要是看自己选择的编译器也有可能是C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin等等!
经过上述4步骤就解决问题了!不错,谢谢原作者的分享!