Distributing a Qt App with QtWebKit

  • So I have a fun little Qt app running on my Windows development machine.

    It uses QtWebKit, which is just great. Nice library. I am now trying to distribute it so someone beside me can use my app.

    When I run the app (the debug build) on my testing machine (without the Qt windows SDK installed), the app opens fine, but when it comes time to open the webpage via QtWebKit, it fails. Specifically, the QWebView's loadFinished(bool) signal is return a false, whereas on my dev machine, the signal is returning true.

    I tried running it through the command line in hopes that would give me an error message, but it didn't.

    Any suggestions?

    Edit: I looked into including plugins, so I tried including all the Qt plugins in my distribution, but the problem remains. This is my directory listing:

    • accessible
    • bearer
    • codecs
    • designer
    • graphicssystems
    • iconengines
    • imageformats
    • phonon_backend
    • sqldrivers
    • app.exe
    • libgcc_s_dw2-1.dll
    • mingwm10.dll
    • phonon4.dll
    • QtCore4.dll
    • QtGui4.dll
    • QtNetwork4.dll
    • QtScript4.dll
    • QtWebKit4.dll

  • No answer, but maybe the following thinking helps you:

    Why are you trying to run DEBUG build on test machine? Try release.

    Dbgview.exe is good utility to capture debug output of the application on Windows

    Is application configured to read plugins from the sub-directories? Use listdlls.exe on running app.exe to view all loaded libraries.

    Is seems for me more like application logic error, not library deployment issue.

  • Moderators

    Have you tried using a tool like procmon (windows) or strace (linux) to log which files are accessed when starting up your application? That way you can make sure to only include those plugins that your application actually needs.

    Sorry, I do not use a Mac regularly, so I am not sure which tool does something similar there.

  • Dbgview.exe did it! I opened it up, then ran my program.

    I got the following errors:

    @00000000 0.00000000 [3676] QSslSocket: cannot call unresolved function SSLv3_client_method
    00000001 0.00019667 [3676] QSslSocket: cannot call unresolved function SSL_CTX_new
    00000002 0.00031736 [3676] QSslSocket: cannot call unresolved function SSL_library_init
    00000003 0.00043385 [3676] QSslSocket: cannot call unresolved function ERR_get_error
    00000004 0.00382842 [3676] QSslSocket: cannot call unresolved function ERR_error_string @

    This kind of makes sense since I was trying to load an HTTPS page.

    I had an error like this is the past, and I solved it by downloading and installing the "OpenSSL binaries for Windows":http://www.slproweb.com/products/Win32OpenSSL.html (win32).

    After installing OpenSSL for Windows on my dev computer, I moved libeay32.dll and ssleay32.dll into my distribution directory, then everything worked fine on my test machine.

  • [quote author="Tobias Hunger" date="1290931612"]Sorry, I do not use a Mac regularly, so I am not sure which tool does something similar there.[/quote]

    On a Mac you can use dtruss. Found it on this "blog post":http://humberto.digi.com.br/blog/2008/02/25/strace-on-mac-os-x-leopard/

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.