Finding the platform plugins
-
If I could find the correct help page in the documentation that talks about installation and deployment, I think I could answer all my questions, but... some how I am missing it...
It has been too long since I had to deal with the install of my Qt4 app and I am working on a new Qt5 application. I copied the EXE and a bunch of supporting DLL's to a Windows 7 virtual machine, then copied over the whole plugins folder to the same location. When I run the program, I get the error:
This application failed to start because it could not find or load the Qt platform plugin "windows".
There is no plugin folder called "windows" on the development machine or on the virtual machine. There is one called platforms, which I tried renaming to windows, but that doesn't do any good either. I also tried creating a batch file and setting the qtplugins to the plugin folder, that doesn't help, either.
What am I missing?
-
Hi,
The platform plugin DLL is [Qt]\plugins\platforms\qwindows.dll
For the official deployment guide, see http://qt-project.org/doc/qt-5.1/qtdoc/deployment-windows.html
For a quick summary, see http://stackoverflow.com/questions/19710879/visual-studio-qt5-plugins-not-working-on-release/19761382#19761382
-
hi,
ok im used to using static builds of qt so this may or may not help you :)
Add the follow lib path to your project:
<PATH-TO-YOUR-QT-FOLDER>\plugins\platformsAdd the following two libs to your projects lib dependencies
Qt5PlatformSupport.lib
qwindows.lib
or for debug
Qt5PlatformSupportd.lib
qwindowsd.libthen above your applications entry point (for example int main())
#include <QtPlugin>
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);hope this is of some help
-
Is this " porting guide":http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5 useful to you ?