Can't launch Qt Quick Controls application - qt

I downloaded Qt 5.4 and created Qt Quick application with Qt Quick Controls 1.3.
I didn't change anything in code, just built it (as release). Then I copied .exe to another folder, added all the .dll files I needed and when I launched my program there was no window, just the program process running in the Task manager.
However, I can launch program which uses QtQuick 1.1.
How can I fix it?
Thanks.
Here is an image for some more explanation:

Try to deploy your application using The Windows Deployment Tool which copies all DLL and other files necessary for deployment alongside your application executable automatically.
The Windows Deployment Tool could be found in QTDIR/bin/windeployqt.exe
Open your command prompt and add the path to your Qt directory and it's bin folder to the PATH variable like :
set PATH= path\to\Qt\bin
Next run the windows deployment tool with your application path as the argument:
windeployqt.exe <path-to-app-binary>
This way you make sure that the deployed application would work on any computer and you have included whatever necessary.

Sounds like you are missing the platform plugin. It should be in the folder of the executable, in a platforms subfolder. That's why you aren't getting a window - the runtime fails to load the platform support plugin. On windows that should be a qwindows.dll file.

Related

How To Deploy Qt MinGW application for windows

I have develop an application by using QT/ MinGW 32 bit.This app work on my pc Windows 8. But ı want to deploy this app to my friends whose computers has windows 7. How to deploy it.Is there a necessary programs,framework to work it like .net framework, C++ runtime etc.. I don't know.I can't find a clear solution
To deploy a Qt app on Windows, you'll need to gather files from a few different locations. Here is an example how to do it.
See http://doc.qt.io/qt-5/windows-deployment.html, section "Creating the Application Package". You just have to copy all the necessary DLLs (and other files in case of Qt Quick) to the same directory as executable file. The best way to test whether you have all the required files is to rename your Qt installation directory (C:\Qt) to something else and try to double-click your executable.
Deployment on Windows 7 is no different from Windows 8.

Qt miss resources after deploying

I have simple Qt program. I have figured out how to use macdeployqt for deploying my app on macbooks without qt installed. But after installation from dmg (it is created using macdeployqt with -dmg option) no resources are displayed.
I added resources to project like this
It displays correctly if I simply put the app bundle from build to my program folder, but it is missing after deploying. What have I done wrong?

Cannot deploy my Quick 2 app to a Windows system without Qt installed

I am using Qt 5 with Visual Studio compiler. I have a Quick 2 application with a c++ backend.
I have bundled together my exe, a bunch of dll files, and all of the plugins from Qt, into a single folder. When I run the exe in this folder on a system with Qt installed but Qt Creator closed, it runs fine. When I run it on a system without Qt installed, it does not crash, but it just opens a small 1-inch square window that is all white, nothing else.
I am using a Qt resource file for the QML, so there are no standalone QML files that could be getting missed by the exe. Again, it runs fine on a system with Qt, so what else could I be missing? Dependency walker does not report any problems.
Here is what is in my app directory:
I've been looking at this for hours and I cannot understand what I must be missing (or why Windows deployment is so challenging with Qt).
The problem was resolved by also adding these directories:

QT: Can't deploy JPEG capability onto fresh windows machine

Jpegs are fine on my developer machine, but are not supported when i deploy my application to a fresh machine. all jpeg files used in stylesheets are still built with the application's resources, but are never displayed.
I tried deploying an "imageformats" folder, child of the executable folder, containing a "qjpeg4.dll" inside.
I tried linking against the qjpeg4.lib in my .pro file, WITH what's specified above.
still no good. Is there something in code I need to specify?
You need to deploy qt plugins with your application. Deploying Qt apps on Windows
This is just a guess, but I'm wondering if there is some dependency of the plugin that cannot be resolved on the virtual machine. Like you said, it is a simple file/folder thing, so it is probably finding the plugin dll. But maybe the dll is failing to load because it cannot resolve one if its dependencies.
The most likely culprit would be the C++ runtimes. Are you deploying those side-by-side in the application directory, or installed via the redistributable? If the former, the plugin may not be able to find them since it is in a different directory. To track this down, you could use the "Dependency Walker" and "SxSTrace.exe" tools.

Qt Deployment for Mac, configuring executable inside bundle

I was previously stuck on trying to build a Qt project that held the Qt libraries in the app bundle. I noticed the problem was that the executable inside the MacOS directory did not have execute permissions. Is there any way configure the build where the executable in the MacOS folder contains execute permissions by default?
You generally never care about exe permission when you build your exec from QtCreator. The main problem is attach all Qt frameworks for mac in your app bundle(solve by macdeployqt)
If you try to recompile from scratch you app, do you have always the same permission problem ?

Resources