PDA

View Full Version : QtWebView posts form in Linux but not in Windows



Exeunt Omnes
14th September 2012, 21:09
I have a Qt application that I develop in Linux (Ubuntu), using Qt Creator, and then rebuild under Windows. It uses QtWebView.

I use QtWebView to display a site (one of mine) that has dynamically-generated links that post a form to Paypal. The HTML is essentially

<a href="javascript: document.form.submit()">...</a>
When I compile and run this under Linux, display the page and click the links, it posts the form correctly to Paypal, which responds as it should.

However, when I rebuild the project for Windows (transferring the source as is, with a few very minor GUI differences), run it, and click the links nothing happens.

Thinking the problem may have been that the version of Qt Creator on Linux was later than the version on Windows I installed an up-to-date version (SDK version 4.8.1) on Windows but this has made no difference.

Other information


I'm using mingw.
The Paypal site uses SSL, of course, but as far as I can tell SSL is compiled into both the Linux and Windows versions.
Neither the Linux version nor the Windows version allows a direct link outside the original site (<a href="http://...">...</a> or <a href="https://...">...</a>).


Does anyone have any suggestions?

Thanks!

ChrisW67
16th September 2012, 03:41
The Paypal site uses SSL, of course,
Yes.

but as far as I can tell SSL is compiled into both the Linux and Windows versions.
If you do not know certainly then this implies that you did not build the libraries yourself. The prebuilt libraries for Windows are built with SSL support but require an external OpenSSL DLL (http://www.openssl.org/related/binaries.html) to enable SSL.

Exeunt Omnes
18th September 2012, 13:10
Thanks for that. Could you give me a bit of guidance on which files I actually need to install? libeay32.dll, libssl32.dll and ssleay32.dll all seem to have something to do with it (and are installed already), but the only file I have been able to find that has the filename 'openssl' is openssl.exe, which is evidently a command-line application. I haven't got into the details of openssl because it's really a bit of a side issue for this project, so I've no idea how these things relate or what their dependencies are.

Many thanks for your help.

Edit:

I've done a bit more reading around this and it seems I have installed the necessary DLLs for SSL already (libeay32.ssl and libssl32.dll). If so it's not SSL that's causing the problem, which is that links that work under Linux don't work under Windows. Can you suggest any other possible reason for this, bearing in mind that (a) the 'links' are in fact javascript 'submit()' calls, and (b) other external links do not work either under Linux or Windows?