QWebView Woes
-
Hi,
I'm obviously missing something here, but i've added a QWebView through the creator interface, and in my mainwindow constructor, I add:
ui->webView->load(QUrl("http://www.google.com/"));Immediatly the program terminates with the following debug messages:
QSslSocket: cannot resolve TLSv1_1_client_method
QSslSocket: cannot resolve TLSv1_2_client_method
QSslSocket: cannot resolve TLSv1_1_server_method
QSslSocket: cannot resolve TLSv1_2_server_method
QSslSocket: cannot resolve SSL_select_next_proto
QSslSocket: cannot resolve SSL_CTX_set_next_proto_select_cb
QSslSocket: cannot resolve SSL_get0_next_proto_negotiated
Auto configuration failed
5492:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c:122:fopen('d:/SDKs/lib/ssl/openssl.cnf','rb')
5492:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c:127:
5492:error:0E078002:configuration file routines:DEF_LOAD:system lib:.\crypto\conf\conf_def.c:199:
QMutex: destroying locked mutexI have QT += webkitwidgets webkit in my pro file,
and have inluded:
#include <QtWebKitWidgets/QWebView>
#include <QUrl>Any ideas? Thanks
BTW, If I miss off the 'http://' the program runs, but I still have an empty WebView -
Hi and welcome to devnet,
Do you have OpenSSL installed on your system ?
-
I've noticed you're using Windows... then you better pay attention to dependencies too
e.g.
if you downloaded from here
https://slproweb.com/products/Win32OpenSSL.htmlnote the message about dependencies:
Visual C++ 2008 Redistributables 1.7MB Installer Having problems with error messages when trying to run OpenSSL? This will likely fix the problem. Only works with Windows 2000 and later. Although there is a "newer version" of this installer, this is the correct version to install.
Also try to copy manually the three *.dll files to your deployment folder to see if that helps
-
Not that I know of, Ill look into that.
Thanks
[quote author="SGaist" date="1414154282"]Hi and welcome to devnet,Do you have OpenSSL installed on your system ?[/quote]
-
That did the trick, thanks thatdude.
so ideally, I would ship the 3 dll's with my app, yes?
what are the dll names?
Thanks for your help
;o)[quote author="ThatDude" date="1414162713"]I've noticed you're using Windows... then you better pay attention to dependencies too
e.g.
if you downloaded from here
https://slproweb.com/products/Win32OpenSSL.htmlnote the message about dependencies:
Visual C++ 2008 Redistributables 1.7MB Installer Having problems with error messages when trying to run OpenSSL? This will likely fix the problem. Only works with Windows 2000 and later. Although there is a "newer version" of this installer, this is the correct version to install.
Also try to copy manually the three *.dll files to your deployment folder to see if that helps[/quote]
-
Windows (unlike Linux) searches local folder first so...
Yes it is preferably to copy these 3 files manually to your deployment folder just in case when deployment machine has other 'global' installation of OpenSSL using different DLLsThe files are:
libeay32.dll
libssl32.dll
ssleay32.dllWhere libssl32.dll is a copy of ssleay32.dll (Check Properties.Details tab under Original filename) for compatibility reasons - some programs still search for that
NB! Copy them to debug AND release folders too!
AND Don't forget to install exactly the same version of "Visual C++ 2008 Redistributables" when deploying.HTH
-
Thanks, that has been a great help
[quote author="ThatDude" date="1414170971"]Windows (unlike Linux) searches local folder first so...
Yes it is preferably to copy these 3 files manually to your deployment folder just in case when deployment machine has other 'global' installation of OpenSSL using different DLLsThe files are:
libeay32.dll
libssl32.dll
ssleay32.dllWhere libssl32.dll is a copy of ssleay32.dll (Check Properties.Details tab under Original filename) for compatibility reasons - some programs still search for that
NB! Copy them to debug AND release folders too!
AND Don't forget to install exactly the same version of "Visual C++ 2008 Redistributables" when deploying.HTH[/quote]
-
To avoid having to copy the dlls each time you do a full rebuild of your application, you can also go to the Run part of the Project panel and modify the PATH environment variable adding the path to the OpenSSL dlls on the front