By default, Nokia Qt does not ship its Qt C++ framework with OpenSSL enabled. This degrades value of the framework and you won’t be able to access HTTPS pages or SSL enabled web services. The examples that require SSL won’t work as well. Take examples\webkit\googlechat for example. This post gives an approach to enable OpenSSL for Qt C++ framework on Windows.
Make sure you have readandbefore proceeding.
- Open CMD console & go to the directory C:\Qt\2010.02.1\qt\src\network (given that you have Qt 4.6.2. installed using standard options offered by the installer)
- Make sure the directories C:\Qt\2010.02.1\qt\bin and C:\Qt\2010.02.1\mingw\bin are in the environment variable PATH. If you are unsure, enter this command:
- Configure QtNetwork build using this one-liner:
qmake "PWD=C:\Qt\2010.02.1\qt\src\network" "QMAKE_LIBS_NETWORK = -lws2_32 -lcrypto -leay32 -lssl32 -lssl -lgdi32" "DEFINES += QT_LINKED_OPENSSL" "DEFINES -= QT_NO_SSL"
It’s your responsibility to ensure that OpenSSL is installed and visible to MinGW.
- Go ahead with building with this single command:
Wait for 5-10 mins and you have QtNetwork with OpenSSL enabled. Enjoy!