I created a platforms directory next to my exe location and put qwindows.dll inside, but I still received the 'Failed to load platform plugin 'windows'. Available platforms are: windows' error.
Qt for Windows - Deployment. And the Windows platform plugin, qwindows.dll, as well as the executable to the same directory tree in the release subdirectory. In contrast to user plugins, Qt plugins must be put into subdirectories matching the plugin type.
I had copied qwindows.dll from C: Qt Qt5.1.1 Tools QtCreator bin plugins platforms, which is not the right location. I looked at the debug log from running in Qt Creator and found that my app was looking in C: Qt Qt5.1.1 5.1.1 mingw4832 plugins platforms when it ran in the debugger. When I copied from C: Qt Qt5.1.1 5.1.1 mingw4832 plugins platforms, everything worked fine.
Edit: Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. The list below). However, none of these answers solved my problem. After a long search I found a comment which had been ignored by all users pointing to the missing lib. Now, many months later, the comment has been changed to an answer. However, when I answered this question by msyself I intended to help other people by directly providing the solution.
This should not be forgotten and so far my answer helped a lot of people. Therefore my question is definitely not a duplicate. By the way: The accepted answer within the provided link on top does not solve the problem! Yes, i used the search: However, in my case the problem still persists. I am using Qt 5.1.1 with Visual Studio 2012 and developed my Application on Windows 7 with Qt Creator 2.8.1. Application is compiled in 'Release'-mode and can be executed if directly started with Qt Creator.
However, when starting from the 'release'-Folder, i get the following message: This application failed to start because it could not find or load the Qt platform plugin 'windows'. Available platform plugins are: minimal, offscreen, windows. Folder structure looks like this: release + gui.exe + icudt51.dll + icuin51.dll + icuuc51.dll + libGLESv2.dll + Qt5Core.dll + Qt5Gui.dll + Qt5Widgets.dll + platforms Platforms is the folder directly copied from Qt Qt5.1.1 5.1.1 msvc2012 plugins platforms including e.g.
Does not matter if I rename it to 'platform' as some other users did. Qt is still not finding the 'platform plugin windows', where is my mistake? I had this problem while using QT 5.6, Anaconda 4.3.23, python 3.5.2 and pyinstaller 3.3. I had created a python program with an interface developed using QTcreator, but had to deploy it to other computers, therefore I needed to make an executable, using pyinstaller. I've found that the problem was solved on my computer if I set the following environment variables: QTQPAPLATFORMPLUGINPATH:%QTDIR% plugins platforms QTDIR: C: Miniconda3 pkgs qt-5.6.2-vc143 Library But this solution only worked on my PC that had conda and qt installed in those folders.
To solve this and make the executable work on any computer, I've had to edit the '.spec' (file first generated by pyinstaller) to include the following line: datas=( 'C: Miniconda3 pkgs qt-5.6.2-vc143 Library plugins platforms.dll', 'platforms' ), This solution is based on the answers of Jim G. And CrippledTable. For a MinGW platform and if you are compiling a Debug target by a hand made CMakeLists.txt written ad hoc you need to add the qwindows.dll to the platform dir as well.
The windeployqt executable does its work well but it seems that for some strange reason the CMake build needs the release variant as well. In summary it will be better to have both the qwindows.dll and qwindowsd.dll in your platform directory.
I did not notice the same strange result when importing the CMake project in QtCreator and then running the build procedure. Compiling on the command line the CMake project seems to trigger the qwindows.dll dependency either if the correct one for the Debug target is set in place (qwindowsd.dll).
Exciting times are ahead for the Microsoft Windows platform, so we want provide you with an update on our plans. Windows 10 is approaching and there is a large amount of improvements coming with Qt 5.5, making the WinRT / Windows Store Applications support better. With this improvements, we would also like to announce that starting with Qt 5.5 we will offer the Qt port of WinRT/Windows Store Applications under the LGPLv3/GPLv2+/Commercial licenses. Windows 10 Provides Compatibility with Existing Qt Applications Microsoft has indicated that they are planning to release Windows 10 this summer, so many Qt users have been curious about the support level we are aiming to provide with Qt 5.5 and subsequent releases. The good news is that all Qt applications created with earlier Windows versions will run on Windows 10 without any limitation.
That includes classic desktop (Win32) applications as well as Windows Store Applications (WinRT). One thing to mention is that on Windows 10 also the Windows Store Applications will be windowed and not only in full-screen anymore. This is supported already if you have an application in the Windows Store and Qt 5.5 will provide further improvements to smoothen glitches on resizing. Qt Offers Portability from Win32 to WinRT The new API for Windows Store Applications (WinRT) is very different from the Win32 API used by the classic Windows applications.
Therefore, a developer who has created a native Windows application needs to in essence re-create the application to use the new API for Windows Store Applications. Fortunately, the situation is much better with Qt-based Windows applications. For any application which uses just the functionality provided by Qt, the only required step is to recompile your Qt for Windows application with WinRT port of Qt to make it a Qt for Windows Store Application. If your application uses native Win32, some further work is needed, but the Qt parts are really easy.
Unfortunately, the automatic styling functionality is not available for the WinRT port of Qt, so although both widgets and Qt Quick work well, the application does not automatically get the platform style. Improvements to the Qt for WinRT (Windows Store Applications) Microsoft’s new API for Windows Store Applications is available in PCs, tablets, phones, and later on, also on embedded devices. A great value is that the same application can run across a wide variety of devices, and all the different kinds of devices can access the common store for applications. Qt applications have been available for earlier versions of both Windows Phone and WinRT for a while now, and we can leverage the same baseline for Qt 5.5 and Windows 10 support.
For Qt 5.5 we have put a lot of effort into further stabilizing and improving the quality of our existing Qt for WinRT port, which supports all variances of Windows Store Apps (desktop and phone). We have been going through the feedback from previous releases and addressed all the most requested items. Qt 5.5 greatly improves, for example, Multimedia support and Visual Studio integration/deployment. Support for Visual Studio 2015 So far Qt for WinRT applications have been built with Visual Studio 2013, which continues to work with Windows 10. There is also a new compiler coming later this year in Visual Studio 2015, which is a major update on the development environment. Visual Studio 2015 Community Technology Preview (CTP) has been out for a while, so we have been doing some research on how Qt behaves against that and some commits are already in the 5.5 branch, while others are still a work-in-progress. Visual Studio 2015 is still under heavy development, so there are currently some workarounds needed to build Qt with it.
After the final version is out, we intend to provide support for it in a Qt 5.5.x patch-level release, including pre-built binaries. Furthermore, the first preview of the Windows 10 SDK has been released, which is valid for Windows Store Apps, including Windows 10 Mobile. We are able to compile Qt against that SDK as well, with a couple of changes required. Similarly as for Visual Studio 2015, we are planning to fully support Windows 10 SDK, after it is officially released. Use of LGPLv3/GPLv2+/Commercial License With Qt 5.5 we are changing the license of the Qt for WinRT port to be LGPLv3 / GPLv2+ / commercial license. We believe that LGPLv3 is a better and clearer license than the older LGPLv2.1, so we want to use it for WinRT / Windows Store Applications in Windows 10 (as well as Windows 8.1 and Windows Phone 8.1). The open-source licenses LGPLv3 and GPLv2+, as well as the commercial licenses of Qt, are compatible with Microsoft’s terms and conditions for the Windows Store.
To learn more why we want to use LGPLv3 in Qt and what it means, please check. Full Support for Windows 10 Coming with Qt 5.5.x As Qt 5.5.0 is scheduled to be released before Windows 10, we aim to provide full support for Windows 10 with a Qt 5.5.x patch release after Windows 10 is available. Our intention is to provide initial support for Windows 10 already with the Qt 5.5.0 release, so that users can try out Qt on Windows 10 preview versions.
As also the Qt applications created with earlier Windows versions will run nicely in Windows 10, we see that things are in good shape for the upcoming major new Windows release. Thanks for the update! The experience with Qt and Windows (8.1) has been very good so far for our app but we needed to wait for Windows 10 because of the GPS limitation in Windows 8.1 (location tracking in background is not possible), that’s why it is especially good news that Windows 10 for Qt is on a good track ? One question regarding the Visual Studio requirement, until know we could only compile Qt with the Ultimate edition (2013).
Is there any chance to get it working with the Express edition?