Deploying Qt Qml App to Windows shows me a blank window

After suffer with a lot of problems trying to deploy a Qt/Qml app to Windows 8, as I described in this question: Deploying Qt Qml app to Windows 8 shows me a blank window

I could make it work copying the Qt5Widgets.dll... but it was only working in my own development machine (installing it there, but yet my own machine). Then I tried to install it in another machine (a VM running Windows 7).. and at first I got error of missing platform plugin... ok, I copied qwindows.dll to appDir/platforms, and it seems to resolved this problem. But then I got another missing dlls errors (the ones related to VS2010), then I installed the Visual Studio 2010 redistributable package... ok, now the app starts, but with a blank window :( The qml files and everything are in a resources file, so it should be in the binary. And I've no idea where to go from there to find this issue.

Any idea what can I do? The weird thing is that it was installed fine in my own development machine. And my conclusion is that deployment of Qt in OS X is much easier.

Answers


I've solved the problem with these steps:

  • check your qml files path. For example default generated code is the following:

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile(QStringLiteral("qml/test/main.qml"));
    

    So qmls should be in "qml/test" folder

  • check the missing dlls:

    1. download VmMap tool from Windows Sysinternals suite (http://technet.microsoft.com/en-us/sysinternals/dd535533)
    2. compile and run your app in qt creator to get it working like it should
    3. run VmMap and open your running app's process.
    4. sort the lower window by 'Details' - so you'll see all loaded DLLs sorted by path.
    5. copy the missing dlls. It should work now!

I've had also a lot of trouble deploying Qml apps with a blank window too.

In general this site gives useful hints: https://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html

The blank window issue was caused be two different things in my case:

  1. The relative path to the qml files were not correct. I've solved this by storing the qml files in a resource file and then calling them from there.

  2. It seems to be a problem if the application is located on a network drive. I haven't found a solution for that except copying the application to a local folder.

In general I think deploying is a big big pain :-/


Need Your Help

Paredit forward slurp "C-)" does not work for emacs on Windows 7

emacs paredit

After migrating to win7 paredit's forward slurp "C-)" no longer works and "C-right arrow" still works, rebinding the sexp to a different combination (such as C-0) works as well.

Millions of 3D points: How to find the 10 of them closest to a given point?

algorithm graphics graph

A point in 3-d is defined by (x,y,z). Distance d between any two points (X,Y,Z) and (x,y,z) is d= Sqrt[(X-x)^2 + (Y-y)^2 + (Z-z)^2].